--- contrib/tzdata/CONTRIBUTING.orig
+++ contrib/tzdata/CONTRIBUTING
@@ -17,11 +17,14 @@
 'diff -u old/europe new/europe >myfix.patch', and attach
 myfix.patch to the email.
 
-For more-elaborate changes, please read the theory.html file and browse
-the mailing list archives <https://mm.icann.org/pipermail/tz/> for
-examples of patches that tend to work well.  Additions to
-data should contain commentary citing reliable sources as
-justification.  Citations should use https: URLs if available.
+For more-elaborate or possibly-controversial changes,
+such as renaming, adding or removing zones, please read
+<https://www.iana.org/time-zones/repository/theory.html> or the file
+theory.html.  It is also good to browse the mailing list archives
+<https://mm.icann.org/pipermail/tz/> for examples of patches that tend
+to work well.  Additions to data should contain commentary citing
+reliable sources as justification.  Citations should use https: URLs
+if available.
 
 Please submit changes against either the latest release in
 <https://www.iana.org/time-zones> or the master branch of the development
--- contrib/tzdata/Makefile.orig
+++ contrib/tzdata/Makefile
@@ -1,3 +1,5 @@
+# Make and install tzdb code and data.
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -19,9 +21,9 @@
 #	DATAFORM=	rearguard
 DATAFORM=		main
 
-# Change the line below for your time zone (after finding the zone you want in
-# the time zone files, or adding it to a time zone file).
-# Alternatively, if you discover you've got the wrong time zone, you can just
+# Change the line below for your timezone (after finding the one you want in
+# one of the $(TDATA) source files, or adding it to a source file).
+# Alternatively, if you discover you've got the wrong timezone, you can just
 #	zic -l rightzone
 # to correct things.
 # Use the command
@@ -31,14 +33,14 @@
 LOCALTIME=	GMT
 
 # If you want something other than Eastern United States time as a template
-# for handling POSIX-style time zone environment variables,
-# change the line below (after finding the zone you want in the
-# time zone files, or adding it to a time zone file).
+# for handling POSIX-style timezone environment variables,
+# change the line below (after finding the timezone you want in the
+# one of the $(TDATA) source files, or adding it to a source file).
 # When a POSIX-style environment variable is handled, the rules in the
 # template file are used to determine "spring forward" and "fall back" days and
 # times; the environment variable itself specifies UT offsets of standard and
 # daylight saving time.
-# Alternatively, if you discover you've got the wrong time zone, you can just
+# Alternatively, if you discover you've got the wrong timezone, you can just
 #	zic -p rightzone
 # to correct things.
 # Use the command
@@ -75,7 +77,7 @@
 # TOPDIR should be empty or an absolute name unless you're just testing.
 TOPDIR =
 
-# The default local time zone is taken from the file TZDEFAULT.
+# The default local timezone is taken from the file TZDEFAULT.
 TZDEFAULT = $(TOPDIR)/etc/localtime
 
 # The subdirectory containing installed program and data files, and
@@ -84,7 +86,7 @@
 USRDIR = usr
 USRSHAREDIR = $(USRDIR)/share
 
-# "Compiled" time zone information is placed in the "TZDIR" directory
+# "Compiled" timezone information is placed in the "TZDIR" directory
 # (and subdirectories).
 # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
 TZDIR_BASENAME=	zoneinfo
@@ -106,9 +108,13 @@
 LIBDIR = $(TOPDIR)/$(USRDIR)/lib
 
 
-# Types to try, as an alternative to time_t.  int64_t should be first.
-TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t
+# Types to try, as an alternative to time_t.
+TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
+TIME_T_ALTERNATIVES_HEAD = int64_t
+TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t
 
+# What kind of TZif data files to generate.
+# (TZif is the binary time zone data format that zic generates.)
 # If you want only POSIX time, with time values interpreted as
 # seconds since the epoch (not counting leap seconds), use
 #	REDO=		posix_only
@@ -129,7 +135,7 @@
 
 REDO=		posix_right
 
-# To install data in text form that has all the information of the binary data,
+# To install data in text form that has all the information of the TZif data,
 # (optionally incorporating leap second information), use
 #	TZDATA_TEXT=	tzdata.zi leapseconds
 # To install text data without leap second information (e.g., because
@@ -171,7 +177,6 @@
 
 # Add the following to the end of the "CFLAGS=" line as needed to override
 # defaults specified in the source code.  "-DFOO" is equivalent to "-DFOO=1".
-#  -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
 #  -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime
 #	formats that generate only the last two digits of year numbers
 #  -DEPOCH_LOCAL if the 'time' function returns local time not UT
@@ -295,7 +300,7 @@
 # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
 # "posix2time", and "time2posix" to be added to the time conversion library.
 # "tzsetwall" is like "tzset" except that it arranges for local wall clock
-# time (rather than the time specified in the TZ environment variable)
+# time (rather than the timezone specified in the TZ environment variable)
 # to be used.
 # "offtime" is like "gmtime" except that it accepts a second (long) argument
 # that gives an offset to add to the time_t when converting it.
@@ -318,7 +323,7 @@
 # "posix2time_z" and "time2posix_z" are added as well.
 # The functions ending in "_z" (or "_rz") are like their unsuffixed
 # (or suffixed-by-"_r") counterparts, except with an extra first
-# argument of opaque type timezone_t that specifies the time zone.
+# argument of opaque type timezone_t that specifies the timezone.
 # "tzalloc" allocates a timezone_t value, and "tzfree" frees it.
 #
 # If you want to allocate state structures in localtime, add
@@ -357,11 +362,14 @@
 
 ZFLAGS=
 
-# How to use zic to install tz binary files.
+# How to use zic to install TZif files.
 
 ZIC_INSTALL=	$(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
 
 # The name of a Posix-compliant 'awk' on your system.
+# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
+# on Ubuntu you can work around this with
+#	AWK=		gawk
 AWK=		awk
 
 # The full path name of a Posix-compliant shell, preferably one that supports
@@ -410,10 +418,16 @@
 SAFE_CHARSET=	$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
 SAFE_CHAR=	'[]'$(SAFE_CHARSET)'-]'
 
+# These characters are Latin-1, and so are likely to be displayable
+# even in editors with limited character sets.
+UNUSUAL_OK_LATIN_1 = «°±»½¾×
+# This IPA symbol is represented in Unicode as the composition of
+# U+0075 and U+032F, and U+032F is not considered alphabetic by some
+# grep implementations that do not grok composition.
+UNUSUAL_OK_IPA = u̯
 # Non-ASCII non-letters that OK_CHAR allows, as these characters are
-# useful in commentary.  XEmacs 21.5.34 displays them correctly,
-# presumably because they are Latin-1.
-UNUSUAL_OK_CHARSET= °±½¾×
+# useful in commentary.
+UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA)
 
 # OK_CHAR matches any character allowed in the distributed files.
 # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
@@ -492,11 +506,14 @@
 			ziguard.awk zishrink.awk
 MISC=		$(AWK_SCRIPTS) zoneinfo2tdf.pl
 TZS_YEAR=	2050
+TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
 TZS=		to$(TZS_YEAR).tzs
 TZS_NEW=	to$(TZS_YEAR)new.tzs
 TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
 			private.h tzfile.h zdump.c zic.c
-ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi
+# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
+EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi
+ENCHILADA = $(EIGHT_YARDS) $(TZS)
 
 # Consult these files when deciding whether to rebuild the 'version' file.
 # This list is not the same as the output of 'git ls-files', since
@@ -560,14 +577,21 @@
 		printf '%s\n' "$$V" >$@.out
 		mv $@.out $@
 
-# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
+# These files can be tailored by setting BACKWARD and PACKRATDATA.
 vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
 		$(AWK) -v DATAFORM=`expr $@ : '\(.*\).zi'` -f ziguard.awk \
 		  $(TDATA) $(PACKRATDATA) >$@.out
 		mv $@.out $@
-tzdata.zi:	$(DATAFORM).zi version
+# This file has a version comment that attempts to capture any tailoring
+# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
+tzdata.zi:	$(DATAFORM).zi version zishrink.awk
 		version=`sed 1q version` && \
-		  LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
+		  LC_ALL=C $(AWK) \
+		    -v dataform='$(DATAFORM)' \
+		    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
+		    -v redo='$(REDO)' \
+		    -v version="$$version" \
+		    -f zishrink.awk \
 		    $(DATAFORM).zi >$@.out
 		mv $@.out $@
 
@@ -605,14 +629,16 @@
  YEARISTYPE='$(YEARISTYPE)' \
  ZIC='$(ZIC)'
 
-# 'make install_data' installs one set of tz binary files.
-install_data:	zic leapseconds yearistype tzdata.zi
+INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi
+
+# 'make install_data' installs one set of TZif files.
+install_data: $(INSTALL_DATA_DEPS)
 		$(ZIC_INSTALL) tzdata.zi
 
-posix_only:
+posix_only: $(INSTALL_DATA_DEPS)
 		$(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data
 
-right_only:
+right_only: $(INSTALL_DATA_DEPS)
 		$(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \
 			install_data
 
@@ -639,7 +665,7 @@
 
 # This obsolescent rule is present for backwards compatibility with
 # tz releases 2014g through 2015g.  It should go away eventually.
-posix_packrat:
+posix_packrat: $(INSTALL_DATA_DEPS)
 		$(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only
 
 zones:		$(REDO)
@@ -650,29 +676,33 @@
 # Rule used only by submakes invoked by the $(TZS_NEW) rule.
 # It is separate so that GNU 'make -j' can run instances in parallel.
 $(ZDS): zdump
-		./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@ : '\(.*\).zd') >$@
+		./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') \
+		  >$@
 
-$(TZS_NEW):	tzdata.zi zdump zic
-		rm -fr tzs.dir
-		mkdir tzs.dir
-		$(zic) -d tzs.dir tzdata.zi
+TZS_NEW_DEPS = tzdata.zi zdump zic
+$(TZS_NEW): $(TZS_NEW_DEPS)
+		rm -fr tzs$(TZS_YEAR).dir
+		mkdir tzs$(TZS_YEAR).dir
+		$(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
 		$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
 		   tzdata.zi | LC_ALL=C sort >$@.out
 		wd=`pwd` && \
-		set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
+		x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
+				tzdata.zi \
 			| LC_ALL=C sort -t . -k 2,2` && \
+		set x $$x && \
 		shift && \
 		ZDS=$$* && \
-		$(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
-		sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@.out
-		rm -fr tzs.dir
+		$(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
+		  ZDS="$$ZDS" $$ZDS && \
+		sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out
+		rm -fr tzs$(TZS_YEAR).dir
 		mv $@.out $@
 
-# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
-# If it exists but 'make check_tzs' fails, a maintainer should inspect the
+# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
 # failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
 $(TZS):
-		$(MAKE) force_tzs
+		touch $@
 
 force_tzs:	$(TZS_NEW)
 		cp $(TZS_NEW) $(TZS)
@@ -711,18 +741,21 @@
 			$(MISC) $(SOURCES) $(WEB_PAGES) \
 			CONTRIBUTING LICENSE README \
 			version tzdata.zi && \
-		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
+		! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
 			Makefile && \
 		! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
 			leapseconds yearistype.sh zone.tab && \
 		! grep -Env $(OK_LINE) $(ENCHILADA); \
 	}
+	touch $@
 
 check_white_space: $(ENCHILADA)
 		patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
-		! grep -En "$$pat" $(ENCHILADA)
+		! grep -En "$$pat" \
+			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
 		! grep -n '[[:space:]]$$' \
 			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
+		touch $@
 
 PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+
 FILE_NAME_COMPONENT_TOO_LONG = \
@@ -731,6 +764,7 @@
 check_name_lengths: $(TDATA_TO_CHECK) backzone
 		! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
 			$(TDATA_TO_CHECK) backzone
+		touch $@
 
 CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }
 
@@ -743,10 +777,12 @@
 		  LC_ALL=C sort -c
 		$(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
 		  LC_ALL=C sort -cu
+		touch $@
 
 check_links:	checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
 		$(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
 		$(AWK) -f checklinks.awk tzdata.zi
+		touch $@
 
 check_tables:	checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
 		for tab in $(ZONETABLES); do \
@@ -753,42 +789,49 @@
 		  $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
 		    || exit; \
 		done
+		touch $@
 
 check_tzs:	$(TZS) $(TZS_NEW)
-		diff -u $(TZS) $(TZS_NEW)
+		if test -s $(TZS); then \
+		  diff -u $(TZS) $(TZS_NEW); \
+		else \
+		  cp $(TZS_NEW) $(TZS); \
+		fi
+		touch $@
 
 # This checks only the HTML 4.01 strict page.
 # To check the the other pages, use <https://validator.w3.org/>.
 check_web:	tz-how-to.html
 		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html
+		touch $@
 
 # Check that zishrink.awk does not alter the data, and that ziguard.awk
 # preserves main-format data.
-check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
-		  $(DATAFORM).zi tzdata.zi
-		for type in posix right; do \
-		  mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
-		    time_t.dir/$$type-shrunk && \
-		  case $$type in \
-		    right) leap='-L leapseconds';; \
-	            *) leap=;; \
-		  esac && \
-		  $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
+check_zishrink: check_zishrink_posix check_zishrink_right
+check_zishrink_posix check_zishrink_right: \
+  zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi
+		rm -fr $@.dir $@-t.dir $@-shrunk.dir
+		mkdir $@.dir $@-t.dir $@-shrunk.dir
+		case $@ in \
+		  *_right) leap='-L leapseconds';; \
+		  *) leap=;; \
+		esac && \
+		  $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \
+		  $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \
 		  case $(DATAFORM) in \
 		    main) \
-		      $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
+		      $(ZIC) $$leap -d $@-t.dir $(TDATA) && \
 		      $(AWK) '/^Rule/' $(TDATA) | \
-			$(ZIC) $$leap -d time_t.dir/$$type-t - \
-			  $(PACKRATDATA) && \
-		      diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
-		  esac && \
-		  $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
-		  diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
-		done
-		rm -fr time_t.dir
+			$(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \
+		      diff -r $@.dir $@-t.dir;; \
+		  esac
+		diff -r $@.dir $@-shrunk.dir
+		rm -fr $@.dir $@-t.dir $@-shrunk.dir
+		touch $@
 
 clean_misc:
-		rm -f core *.o *.out \
+		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
+		  check_* core typecheck_* \
 		  date tzselect version.h zdump zic yearistype libtz.a
 clean:		clean_misc
 		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
@@ -818,7 +861,7 @@
 		LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out
 		mv $@.out $@
 
-# Set the time stamps to those of the git repository, if available,
+# Set the timestamps to those of the git repository, if available,
 # and if the files have not changed since then.
 # This uses GNU 'touch' syntax 'touch -d@N FILE',
 # where N is the number of seconds since 1970.
@@ -825,10 +868,10 @@
 # If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
 # Also, set the timestamp of each prebuilt file like 'leapseconds'
 # to be the maximum of the files it depends on.
-set-timestamps.out: $(ENCHILADA)
+set-timestamps.out: $(EIGHT_YARDS)
 		rm -f $@
 		if (type git) >/dev/null 2>&1 && \
-		   files=`git ls-files $(ENCHILADA)` && \
+		   files=`git ls-files $(EIGHT_YARDS)` && \
 		   touch -md @1 test.out; then \
 		  rm -f test.out && \
 		  for file in $$files; do \
@@ -846,71 +889,86 @@
 		    exit; \
 		done
 		touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi
-		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
 		touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
 		touch $@
+set-tzs-timestamp.out: $(TZS)
+		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
+		touch $@
 
 # The zics below ensure that each data file can stand on its own.
 # We also do an all-files run to catch links to links.
 
-check_public:
-		$(MAKE) maintainer-clean
-		$(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
-		mkdir -p public.dir
-		for i in $(TDATA_TO_CHECK) tzdata.zi; do \
-		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
+check_public: $(VERSION_DEPS)
+		rm -fr public.dir
+		mkdir public.dir
+		ln $(VERSION_DEPS) public.dir
+		cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL
+		for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \
+		  public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
 		done
-		$(zic) -v -d public.dir $(TDATA_TO_CHECK)
+		public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
 		rm -fr public.dir
+		touch $@
 
 # Check that the code works under various alternative
 # implementations of time_t.
-check_time_t_alternatives:
-		if diff -q Makefile Makefile 2>/dev/null; then \
-		  quiet_option='-q'; \
+check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
+$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
+$(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
+		rm -fr $@.dir
+		mkdir $@.dir
+		ln $(VERSION_DEPS) $@.dir
+		case $@ in \
+		  int32_t) range=-2147483648,2147483648;; \
+		  u*) range=0,4294967296;; \
+		  *) range=-4294967296,4294967296;; \
+		esac && \
+		wd=`pwd` && \
+		zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
+		if test $@ = $(TIME_T_ALTERNATIVES_HEAD); then \
+		  range_target=; \
 		else \
-		  quiet_option=''; \
+		  range_target=to$$range.tzs; \
 		fi && \
-		wd=`pwd` && \
-		zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
-		for type in $(TIME_T_ALTERNATIVES); do \
-		  mkdir -p time_t.dir/$$type && \
-		  $(MAKE) clean_misc && \
-		  $(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
-		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
+		(cd $@.dir && \
+		  $(MAKE) TOPDIR="$$wd/$@.dir" \
+		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$@'" \
 		    REDO='$(REDO)' \
-		    install && \
-		  diff $$quiet_option -r \
-		    time_t.dir/int64_t/etc \
-		    time_t.dir/$$type/etc && \
-		  diff $$quiet_option -r \
-		    time_t.dir/int64_t/usr/share \
-		    time_t.dir/$$type/usr/share && \
-		  case $$type in \
-		  int32_t) range=-2147483648,2147483647;; \
-		  uint32_t) range=0,4294967296;; \
-		  int64_t) continue;; \
-		  *u*) range=0,10000000000;; \
-		  *) range=-10000000000,10000000000;; \
-		  esac && \
-		  echo checking $$type zones ... && \
-		  time_t.dir/int64_t/usr/bin/zdump -V -t $$range $$zones \
-		      >time_t.dir/int64_t.out && \
-		  time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \
-		      >time_t.dir/$$type.out && \
-		  diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
-		    || exit; \
-		done
-		rm -fr time_t.dir
+			D=$$wd/$@.dir \
+		    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
+		    install $$range_target) && \
+		test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
+		  (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
+		    $(MAKE) TOPDIR="$$wd/$@.dir" \
+		      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
+			D=$$wd/$@.dir \
+		      to$$range.tzs) && \
+		  diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
+			  $@.dir/to$$range.tzs && \
+		  if diff -q Makefile Makefile 2>/dev/null; then \
+		    quiet_option='-q'; \
+		  else \
+		    quiet_option=''; \
+		  fi && \
+		    diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
+					   $@.dir/etc && \
+		    diff $$quiet_option -r \
+		      $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
+		      $@.dir/usr/share; \
+		}
+		touch $@
 
 TRADITIONAL_ASC = \
   tzcode$(VERSION).tar.gz.asc \
   tzdata$(VERSION).tar.gz.asc
-ALL_ASC = $(TRADITIONAL_ASC) \
-  tzdata$(VERSION)-rearguard.tar.gz.asc \
+REARGUARD_ASC = \
+  tzdata$(VERSION)-rearguard.tar.gz.asc
+ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
   tzdb-$(VERSION).tar.lz.asc
 
-tarballs traditional_tarballs signatures traditional_signatures: version
+tarballs rearguard_tarballs traditional_tarballs \
+signatures rearguard_signatures traditional_signatures: \
+  version set-timestamps.out rearguard.zi
 		VERSION=`cat version` && \
 		$(MAKE) VERSION="$$VERSION" $@_version
 
@@ -917,12 +975,14 @@
 # These *_version rules are intended for use if VERSION is set by some
 # other means.  Ordinarily these rules are used only by the above
 # non-_version rules, which set VERSION on the 'make' command line.
-tarballs_version: traditional_tarballs_version \
-  tzdata$(VERSION)-rearguard.tar.gz \
+tarballs_version: traditional_tarballs_version rearguard_tarballs_version \
   tzdb-$(VERSION).tar.lz
+rearguard_tarballs_version: \
+  tzdata$(VERSION)-rearguard.tar.gz
 traditional_tarballs_version: \
   tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
 signatures_version: $(ALL_ASC)
+rearguard_signatures_version: $(REARGUARD_ASC)
 traditional_signatures_version: $(TRADITIONAL_ASC)
 
 tzcode$(VERSION).tar.gz: set-timestamps.out
@@ -958,7 +1018,7 @@
 		     gzip $(GZIPFLAGS)) >$@.out
 		mv $@.out $@
 
-tzdb-$(VERSION).tar.lz: set-timestamps.out
+tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
 		rm -fr tzdb-$(VERSION)
 		mkdir tzdb-$(VERSION)
 		ln $(ENCHILADA) tzdb-$(VERSION)
@@ -972,16 +1032,26 @@
 tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
 tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
 $(ALL_ASC):
-		gpg --armor --detach-sign $?
+		gpg2 --armor --detach-sign $?
 
-typecheck:
-		$(MAKE) clean
-		for i in "long long" unsigned; \
-		do \
-			$(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
-			./zdump -v Europe/Rome ; \
-			$(MAKE) clean ; \
-		done
+TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
+typecheck: typecheck_long_long typecheck_unsigned
+typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
+		rm -fr $@.dir
+		mkdir $@.dir
+		ln $(VERSION_DEPS) $@.dir
+		cd $@.dir && \
+		  case $@ in \
+		    *_long_long) i="long long";; \
+		    *_unsigned ) i="unsigned" ;; \
+		  esac && \
+		  typecheck_cflags='' && \
+		  $(MAKE) \
+		    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
+		    TOPDIR="`pwd`" \
+		    install
+		$@.dir/zdump -i -c 1970,1971 Europe/Rome
+		touch $@
 
 zonenames:	tzdata.zi
 		@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
@@ -997,14 +1067,14 @@
 .KEEP_STATE:
 
 .PHONY: ALL INSTALL all
-.PHONY: check check_character_set check_links check_name_lengths
-.PHONY: check_public check_sorted check_tables
-.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
+.PHONY: check check_time_t_alternatives
 .PHONY: check_zishrink
 .PHONY: clean clean_misc dummy.zd force_tzs
 .PHONY: install install_data maintainer-clean names
-.PHONY: posix_only posix_packrat posix_right
-.PHONY: public right_only right_posix signatures signatures_version
+.PHONY: posix_only posix_packrat posix_right public
+.PHONY: rearguard_signatures rearguard_signatures_version
+.PHONY: rearguard_tarballs rearguard_tarballs_version
+.PHONY: right_only right_posix signatures signatures_version
 .PHONY: tarballs tarballs_version
 .PHONY: traditional_signatures traditional_signatures_version
 .PHONY: traditional_tarballs traditional_tarballs_version
--- contrib/tzdata/NEWS.orig
+++ contrib/tzdata/NEWS
@@ -1,5 +1,171 @@
 News for the tz database
 
+Release 2018g - 2018-10-26 22:22:45 -0700
+
+  Briefly:
+    Morocco switches to permanent +01 on 2018-10-27.
+
+  Changes to future timestamps
+
+    Morocco switches from +00/+01 to permanent +01 effective 2018-10-27,
+    so its clocks will not fall back on 2018-10-28 as previously scheduled.
+    (Thanks to Mohamed Essedik Najd and Brian Inglis.)
+
+  Changes to code
+
+    When generating TZif files with leap seconds, zic no longer uses a
+    format that trips up older 32-bit clients, fixing a bug introduced
+    in 2018f.  (Reported by Daniel Fischer.)  Also, the zic workaround
+    for QTBUG-53071 now also works for TZif files with leap seconds.
+
+    The translator to rearguard format now rewrites the line
+    "Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S" to
+    "Rule Japan 1948 1951 - Sep Sun>=9  1:00 0 S".
+    This caters to zic before 2007 and to Oracle TZUpdater 2.2.0
+    and earlier.  (Reported by Christos Zoulas.)
+
+  Changes to past time zone abbreviations
+
+    Change HDT to HWT/HPT for WWII-era abbreviations in Hawaii.
+    This reverts to 2011h, as the abbreviation change in 2011i was
+    likely inadvertent.
+
+  Changes to documentation
+
+    tzfile.5 has new sections on interoperability issues.
+
+
+Release 2018f - 2018-10-18 00:14:18 -0700
+
+  Briefly:
+  Volgograd moves from +03 to +04 on 2018-10-28.
+  Fiji ends DST 2019-01-13, not 2019-01-20.
+  Most of Chile changes DST dates, effective 2019-04-06.
+
+  Changes to future timestamps
+
+    Volgograd moves from +03 to +04 on 2018-10-28 at 02:00.
+    (Thanks to Alexander Fetisov and Stepan Golosunov.)
+
+    Fiji ends DST 2019-01-13 instead of the 2019-01-20 previously
+    predicted.  (Thanks to Raymond Kumar.)  Adjust future predictions
+    accordingly.
+
+    Most of Chile will end DST on the first Saturday in April at 24:00 mainland
+    time, and resume DST on the first Saturday in September at 24:00 mainland
+    time.  The changes are effective from 2019-04-06, and do not affect the
+    Magallanes region modeled by America/Punta_Arenas.  (Thanks to Juan Correa
+    and Tim Parenti.)  Adjust future predictions accordingly.
+
+  Changes to past timestamps
+
+    The 2018-05-05 North Korea 30-minute time zone change took place
+    at 23:30 the previous day, not at 00:00 that day.
+
+    China's 1988 spring-forward transition was on April 17, not
+    April 10.  Its DST transitions in 1986/91 were at 02:00, not 00:00.
+    (Thanks to P Chan.)
+
+    Fix several issues for Macau before 1992.  Macau's pre-1904 LMT
+    was off by 10 s.  Macau switched to +08 in 1904 not 1912, and
+    temporarily switched to +09/+10 during World War II.  Macau
+    observed DST in 1942/79, not 1961/80, and there were several
+    errors for transition times and dates.  (Thanks to P Chan.)
+
+    The 1948-1951 fallback transitions in Japan were at 25:00 on
+    September's second Saturday, not at 24:00.  (Thanks to Phake Nick.)
+    zic turns this into 01:00 on the day after September's second
+    Saturday, which is the best that POSIX or C platforms can do.
+
+    Incorporate 1940-1949 Asia/Shanghai DST transitions from a 2014
+    paper by Li Yu, replacing more-questionable data from Shanks.
+
+  Changes to time zone abbreviations
+
+    Use "PST" and "PDT" for Philippine time.  (Thanks to Paul Goyette.)
+
+  Changes to code
+
+    zic now always generates TZif files where time type 0 is used for
+    timestamps before the first transition.  This simplifies the
+    reading of TZif files and should not affect behavior of existing
+    TZif readers because the same set of time types is used; only
+    their internal indexes may have changed.  This affects only the
+    legacy zones EST5EDT, CST6CDT, MST7MDT, PST8PDT, CET, MET, and
+    EET, which previously used nonzero types for these timestamps.
+
+    Because of the type 0 change, zic no longer outputs a dummy
+    transition at time -2**59 (before the Big Bang), as clients should
+    no longer need this to handle historical timestamps correctly.
+    This reverts a change introduced in 2013d and shrinks most TZif
+    files by a few bytes.
+
+    zic now supports negative time-of-day in Rule and Leap lines, e.g.,
+    "Rule X min max - Apr lastSun -6:00 1:00 -" means the transition
+    occurs at 18:00 on the Saturday before the last Sunday in April.
+    This behavior was documented in 2018a but the code did not
+    entirely match the documentation.
+
+    localtime.c no longer requires at least one time type in TZif
+    files that lack transitions or have a POSIX-style TZ string.  This
+    future-proofs the code against possible future extensions to the
+    format that would allow TZif files with POSIX-style TZ strings and
+    without transitions or time types.
+
+    A read-access subscript error in localtime.c has been fixed.
+    It could occur only in TZif files with timecnt == 0, something that
+    does not happen in practice now but could happen in future versions.
+
+    localtime.c no longer ignores TZif POSIX-style TZ strings that
+    specify only standard time.  Instead, these TZ strings now
+    override the default time type for timestamps after the last
+    transition (or for all time stamps if there are no transitions),
+    just as DST strings specifying DST have always done.
+
+    leapseconds.awk now outputs "#updated" and "#expires" comments,
+    and supports leap seconds at the ends of months other than June
+    and December.  (Inspired by suggestions from Chris Woodbury.)
+
+  Changes to documentation
+
+    New restrictions: A Rule name must start with a character that
+    is neither an ASCII digit nor "-" nor "+", and an unquoted name
+    should not use characters in the set "!$%&'()*,/:;<=>?@[\]^`{|}~".
+    The latter restriction makes room for future extensions (a
+    possibility noted by Tom Lane).
+
+    tzfile.5 now documents what time types apply before the first and
+    after the last transition, if any.
+
+    Documentation now uses the spelling "timezone" for a TZ setting
+    that determines timestamp history, and "time zone" for a
+    geographic region currently sharing the same standard time.
+
+    The name "TZif" is now used for the tz binary data format.
+
+    tz-link.htm now mentions the A0 TimeZone Migration utilities.
+    (Thanks to Aldrin Martoq for the link.)
+
+  Changes to build procedure
+
+    New 'make' target 'rearguard_tarballs' to build the rearguard
+    tarball only.  This is a convenience on platforms that lack lzip
+    if you want to build the rearguard tarball.  (Problem reported by
+    Deborah Goldsmith.)
+
+    tzdata.zi is now more stable from release to release.  (Problem
+    noted by Tom Lane.)  It is also a bit shorter.
+
+    tzdata.zi now can contain comment lines documenting configuration
+    information, such as which data format was selected, which input
+    files were used, and how leap seconds are treated.  (Problems
+    noted by Lester Caine and Brian Inglis.)  If the Makefile defaults
+    are used these comment lines are absent, for backward
+    compatibility.  A redistributor intending to alter its copy of the
+    files should also append "-LABEL" to the 'version' file's first
+    line, where "LABEL" identifies the redistributor's change.
+
+
 Release 2018e - 2018-05-01 23:42:51 -0700
 
   Briefly:
@@ -9,7 +175,7 @@
     'make tarballs' now also builds a rearguard tarball.
     New 's' and 'd' suffixes in SAVE columns of Rule and Zone lines.
 
-  Changes to past and future time stamps
+  Changes to past and future timestamps
 
     North Korea switches back from +0830 to +09 on 2018-05-05.
     (Thanks to Kang Seonghoon, Arthur David Olson, Seo Sanghyeon,
@@ -17,9 +183,9 @@
 
     Bring back the negative-DST changes of 2018a, except be more
     compatible with data parsers that do not support negative DST.
-    Also, this now affects historical time stamps in Namibia and the
+    Also, this now affects historical timestamps in Namibia and the
     former Czechoslovakia, not just Ireland.  The main format now uses
-    negative DST to model time stamps in Europe/Dublin (from 1971 on),
+    negative DST to model timestamps in Europe/Dublin (from 1971 on),
     Europe/Prague (1946/7), and Africa/Windhoek (1994/2017).  This
     does not affect UT offsets, only time zone abbreviations and the
     tm_isdst flag.  Also, this does not affect rearguard or vanguard
@@ -44,7 +210,7 @@
     in tzdata, it could be used to specify the legal time in Namibia
     1994-2017, as opposed to the popular time (see below).
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     From 1994 through 2017 Namibia observed DST in winter, not summer.
     That is, it used negative DST, as Ireland still does.  This change
@@ -54,12 +220,12 @@
     both simply called "standard time" in Namibian law, in common
     practice winter time was considered to be DST (as noted by Stephen
     Colebourne).  The full effect of this change is only in vanguard
-    format; in rearguard and main format, the tm_isdst flag is still
+    and main format; in rearguard format, the tm_isdst flag is still
     zero in winter and nonzero in summer.
 
     In 1946/7 Czechoslovakia also observed negative DST in winter.
-    The full effect of this change is only in vanguard format; in
-    rearguard and main formats, it is modeled as plain GMT without
+    The full effect of this change is only in vanguard and main
+    formats; in rearguard format, it is modeled as plain GMT without
     daylight saving.  Also, the dates of some 1944/5 DST transitions
     in Czechoslovakia have been changed.
 
@@ -72,17 +238,17 @@
   Add support for vanguard and rearguard data consumers.
   Add subsecond precision to source data format, though not to data.
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     In 2018, Palestine starts DST on March 24, not March 31.
     Adjust future predictions accordingly.  (Thanks to Sharef Mustafa.)
 
-  Changes to past and future time stamps
+  Changes to past and future timestamps
 
     Casey Station in Antarctica changed from +11 to +08 on 2018-03-11
     at 04:00.  (Thanks to Steffen Thorsen.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     Historical transitions for Uruguay, represented by
     America/Montevideo, have been updated per official legal documents,
@@ -224,7 +390,7 @@
     change is reapplied.  (Problems reported by Deborah Goldsmith and
     Stephen Colebourne.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     Japanese DST transitions (1948-1951) were Sundays at 00:00, not
     Saturdays or Sundays at 02:00.  (Thanks to Takayuki Nikai.)
@@ -256,18 +422,18 @@
   Use Debian-style installation locations, instead of 4.3BSD-style.
   New zic option -t.
 
-  Changes to past and future time stamps
+  Changes to past and future timestamps
 
     São Tomé and Príncipe switched from +00 to +01 on 2018-01-01 at
     01:00.  (Thanks to Steffen Thorsen and Michael Deckers.)
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     Starting in 2018 southern Brazil will begin DST on November's
     first Sunday instead of October's third Sunday.  (Thanks to
     Steffen Thorsen.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     A discrepancy of 4 s in timestamps before 1931 in South Sudan has
     been corrected.  The 'backzone' and 'zone.tab' files did not agree
@@ -355,7 +521,7 @@
   A new file tzdata.zi now holds a small text copy of all data.
   The zic input format has been regularized slightly.
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     Northern Cyprus has decided to resume EU rules starting
     2017-10-29, thus reinstituting winter time.
@@ -381,7 +547,7 @@
     2018-03-11 at 03:00.  This affects UT offsets starting 2018-11-04
     at 02:00.  (Thanks to Steffen Thorsen.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     Namibia switched from +02 to +01 on 1994-03-21, not 1994-04-03.
     (Thanks to Arthur David Olson.)
@@ -511,11 +677,11 @@
 
   Briefly: Haiti has resumed DST.
 
-  Changes to past and future time stamps
+  Changes to past and future timestamps
 
     Haiti resumed observance of DST in 2017.  (Thanks to Steffen Thorsen.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01.
 
@@ -527,7 +693,7 @@
     The reference localtime implementation now falls back on the
     current US daylight-saving transition rules rather than the
     1987-2006 rules.  This fallback occurs only when (1) the TZ
-    environment variable's value has a name like "AST4ADT" that asks
+    environment variable has a value like "AST4ADT" that asks
     for daylight saving time but does not specify the rules, (2) there
     is no file by that name, and (3) the TZDEFRULES file cannot be
     loaded.  (Thanks to Tom Lane.)
@@ -538,7 +704,7 @@
   Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia
   discontinues DST.
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     Mongolia no longer observes DST.  (Thanks to Ganbold Tsagaankhuu.)
 
@@ -549,12 +715,12 @@
     assume it's permanent.  (Thanks to Juan Correa and Deborah
     Goldsmith.)  This also affects Antarctica/Palmer.
 
-  Changes to past time stamps
+  Changes to past timestamps
 
-    Fix many entries for historical time stamps for Europe/Madrid
+    Fix many entries for historical timestamps for Europe/Madrid
     before 1979, to agree with tables compiled by Pere Planesas of the
     National Astronomical Observatory of Spain.  As a side effect,
-    this changes some time stamps for Africa/Ceuta before 1929, which
+    this changes some timestamps for Africa/Ceuta before 1929, which
     are probably guesswork anyway.  (Thanks to Steve Allen and
     Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for
     correcting the 1901 transition.)
@@ -645,13 +811,13 @@
 
   Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04.
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00.
     This hives off a new zone Europe/Saratov from Europe/Volgograd.
     (Thanks to Yuri Konotopov and Stepan Golosunov.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like
     Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring
@@ -687,7 +853,7 @@
   Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga
   reintroduces DST on 2016-11-06.
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on
     2017-01-15 at 03:00.  Assume future observances in Tonga will be
@@ -695,7 +861,7 @@
     January, like Fiji.  (Thanks to Pulu ʻAnau.)  Switch to numeric
     time zone abbreviations for this zone.
 
-  Changes to past and future time stamps
+  Changes to past and future timestamps
 
     Northern Cyprus is now +03 year round, causing a split in Cyprus
     time zones starting 2016-10-30 at 04:00.  This creates a zone
@@ -704,9 +870,9 @@
     Antarctica/Casey switched from +08 to +11 on 2016-10-22.
     (Thanks to Steffen Thorsen.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
-    Several corrections were made for pre-1975 time stamps in Italy.
+    Several corrections were made for pre-1975 timestamps in Italy.
     These affect Europe/Malta, Europe/Rome, Europe/San_Marino, and
     Europe/Vatican.
 
@@ -744,7 +910,7 @@
 
 Release 2016h - 2016-10-19 23:17:57 -0700
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     Asia/Gaza and Asia/Hebron end DST on 2016-10-29 at 01:00, not
     2016-10-21 at 00:00.  (Thanks to Sharef Mustafa.)  Predict that
@@ -752,7 +918,7 @@
     at 01:00, which is consistent with predicted spring transitions
     on the last Saturday of March.  (Thanks to Tim Parenti.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     In Turkey, transitions in 1986-1990 were at 01:00 standard time
     not at 02:00, and the spring 1994 transition was on March 20, not
@@ -801,7 +967,7 @@
 
 Release 2016g - 2016-09-13 08:56:38 -0700
 
-  Changes to future time stamps
+  Changes to future timestamps
 
     Turkey switched from EET/EEST (+02/+03) to permanent +03,
     effective 2016-09-07.  (Thanks to Burak AYDIN.)  Use "+03" rather
@@ -810,7 +976,7 @@
     New leap second 2016-12-31 23:59:60 UTC as per IERS Bulletin C 52.
     (Thanks to Tim Parenti.)
 
-  Changes to past time stamps
+  Changes to past timestamps
 
     For America/Los_Angeles, spring-forward transition times have been
     corrected from 02:00 to 02:01 in 1948, and from 02:00 to 01:00 in
@@ -859,9 +1025,9 @@
     zic no longer generates binary files containing POSIX TZ-like
     strings that disagree with the local time type after the last
     explicit transition in the data.  This fixes a bug with
-    Africa/Casablanca and Africa/El_Aaiun in some year-2037 time
-    stamps on the reference platform.  (Thanks to Alexander Belopolsky
-    for reporting the bug and suggesting a way forward.)
+    Africa/Casablanca and Africa/El_Aaiun in some year-2037 timestamps
+    on the reference platform.  (Thanks to Alexander Belopolsky for
+    reporting the bug and suggesting a way forward.)
 
     If the installed localtime and/or posixrules files are symbolic
     links, zic now keeps them symbolic links when updating them, for
@@ -924,7 +1090,7 @@
 
 Release 2016f - 2016-07-05 16:26:51 +0200
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     The Egyptian government changed its mind on short notice, and
     Africa/Cairo will not introduce DST starting 2016-07-07 after all.
@@ -933,12 +1099,12 @@
     Asia/Novosibirsk switches from +06 to +07 on 2016-07-24 at 02:00.
     (Thanks to Stepan Golosunov.)
 
-  Changes to past and future time stamps
+  Changes to past and future timestamps
 
     Asia/Novokuznetsk and Asia/Novosibirsk now use numeric time zone
     abbreviations instead of invented ones.
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     Europe/Minsk's 1992-03-29 spring-forward transition was at 02:00 not 00:00.
     (Thanks to Stepan Golosunov.)
@@ -946,7 +1112,7 @@
 
 Release 2016e - 2016-06-14 08:46:16 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Africa/Cairo observes DST in 2016 from July 7 to the end of October.
     Guess October 27 and 24:00 transitions.  (Thanks to Steffen Thorsen.)
@@ -953,7 +1119,7 @@
     For future years, guess April's last Thursday to October's last
     Thursday except for Ramadan.
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     Locations while uninhabited now use '-00', not 'zzz', as a
     placeholder time zone abbreviation.  This is inspired by Internet
@@ -982,7 +1148,7 @@
 
 Release 2016d - 2016-04-17 22:50:29 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
     (Thanks to Alexander Krivenyshev for the heads-up.)
@@ -994,7 +1160,7 @@
     Tomsk Oblast, Russia, which switches from +06 to +07 on 2016-05-29
     at 02:00.  (Thanks to Stepan Golosunov.)
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     New zone Europe/Kirov, split off from Europe/Volgograd.  It covers
     Kirov Oblast, Russia, which switched from +04/+05 to +03/+04 on
@@ -1017,7 +1183,7 @@
 
 Release 2016c - 2016-03-23 00:51:27 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Azerbaijan no longer observes DST.  (Thanks to Steffen Thorsen.)
 
@@ -1028,7 +1194,7 @@
     2014-09-07 through 2016-05-14 daylight saving time instead of
     standard time, as that seems more appropriate now.
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
     +02/+03 on 1989-03-26, not 1991-03-31.  Europe/Volgograd changed
@@ -1053,7 +1219,7 @@
     POSIX.1-1988 that was removed in POSIX.1-2001.  One way to suppress the
     warnings is to upgrade to zic derived from tz releases 2015f and later.
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     New zones Europe/Astrakhan and Europe/Ulyanovsk for Astrakhan and
     Ulyanovsk Oblasts, Russia, both of which will switch from +03 to +04 on
@@ -1077,7 +1243,7 @@
     (Thanks to Hannah Kreitem.) Guess future transitions will be March's last
     Saturday at 01:00, not March's last Friday at 24:00.
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     Europe/Chisinau observed DST during 1990, and switched from +04 to
     +03 at 1990-05-06 02:00, instead of switching from +03 to +02.
@@ -1112,7 +1278,7 @@
 
 Release 2016a - 2016-01-26 23:28:02 -0800
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     America/Cayman will not observe daylight saving this year after all.
     Revert our guess that it would.  (Thanks to Matt Johnson.)
@@ -1124,7 +1290,7 @@
     to be March 21 00:00 to September 21 00:00.  This is likely better
     than predicting no DST, albeit off by a day every now and then.
 
-  Changes affecting past and future time stamps
+  Changes affecting past and future timestamps
 
     America/Metlakatla switched from PST all year to AKST/AKDT on
     2015-11-01 at 02:00.  (Thanks to Steffen Thorsen.)
@@ -1133,7 +1299,7 @@
     backward compatibility link to America/Tijuana.  Its contents were
     apparently based on a misreading of Mexican legislation.
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     Asia/Karachi's two transition times in 2002 were off by a minute.
     (Thanks to Matt Johnson.)
@@ -1167,7 +1333,7 @@
 
 Release 2015g - 2015-10-01 00:39:51 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.
     (Thanks to Fatih.)
@@ -1182,7 +1348,7 @@
     effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
     New zone America/Fort_Nelson.  (Thanks to Matt Johnson.)
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     Norfolk observed DST from 1974-10-27 02:00 to 1975-03-02 02:00.
 
@@ -1212,7 +1378,7 @@
 
 Release 2015f - 2015-08-10 18:06:56 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     North Korea switches to +0830 on 2015-08-15.  (Thanks to Steffen Thorsen.)
     The abbreviation remains "KST".  (Thanks to Robert Elz.)
@@ -1220,7 +1386,7 @@
     Uruguay no longer observes DST.  (Thanks to Steffen Thorsen
     and Pablo Camargo.)
 
-  Changes affecting past and future time stamps
+  Changes affecting past and future timestamps
 
     Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC.
     (Thanks to Roman Tudos.)
@@ -1279,7 +1445,7 @@
 
 Release 2015e - 2015-06-13 10:56:02 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00,
     not 06-13 and 07-18 as we had guessed.  (Thanks to Milamber.)
@@ -1307,13 +1473,13 @@
 
 Release 2015d - 2015-04-24 08:09:46 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Egypt will not observe DST in 2015 and will consider canceling it
     permanently.  For now, assume no DST indefinitely.
     (Thanks to Ahmed Nazmy and Tim Parenti.)
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     America/Whitehorse switched from UT -09 to -08 on 1967-05-28, not
     1966-07-01.  Also, Yukon's time zone history is documented better.
@@ -1333,7 +1499,7 @@
 
 Release 2015c - 2015-04-11 08:55:55 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Egypt's spring-forward transition is at 24:00 on April's last Thursday,
     not 00:00 on April's last Friday.  2015's transition will therefore be on
@@ -1340,9 +1506,9 @@
     Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.  Similar fixes
     apply to 2026, 2037, 2043, etc.  (Thanks to Steffen Thorsen.)
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
-    The following changes affect some pre-1991 Chile-related time stamps
+    The following changes affect some pre-1991 Chile-related timestamps
     in America/Santiago, Antarctica/Palmer, and Pacific/Easter.
 
       The 1910 transition was January 10, not January 1.
@@ -1367,8 +1533,8 @@
       since we have no data suggesting that they existed.
 
     One more zone has been turned into a link, as it differed
-    from an existing zone only for older time stamps.  As usual,
-    this change affects UT offsets in pre-1970 time stamps only.
+    from an existing zone only for older timestamps.  As usual,
+    this change affects UT offsets in pre-1970 timestamps only.
     The zone's old contents have been moved to the 'backzone' file.
     The affected zone is America/Montreal.
 
@@ -1381,7 +1547,7 @@
 
 Release 2015b - 2015-03-19 23:28:11 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Mongolia will start observing DST again this year, from the last
     Saturday in March at 02:00 to the last Saturday in September at 00:00.
@@ -1391,14 +1557,14 @@
     correct the fall 2014 transition from September 26 to October 24.
     Adjust future predictions accordingly.  (Thanks to Steffen Thorsen.)
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
     regression.  (Thanks to Stuart Bishop for reporting the problem.)
 
     Some more zones have been turned into links, when they differed
-    from existing zones only for older time stamps.  As usual,
-    these changes affect UT offsets in pre-1970 time stamps only.
+    from existing zones only for older timestamps.  As usual,
+    these changes affect UT offsets in pre-1970 timestamps only.
     Their old contents have been moved to the 'backzone' file.
     The affected zones are: America/Antigua, America/Cayman,
     Pacific/Midway, and Pacific/Saipan.
@@ -1429,7 +1595,7 @@
 
 Release 2015a - 2015-01-29 22:35:20 -0800
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     The Mexican state of Quintana Roo, represented by America/Cancun,
     will shift from Central Time with DST to Eastern Time without DST
@@ -1442,7 +1608,7 @@
     New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
     (Thanks to Tim Parenti.)
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
     Iceland observed DST in 1919 and 1921, and its 1939 fallback
     transition was Oct. 29, not Nov. 29.  Remove incorrect data from
@@ -1449,8 +1615,8 @@
     Shanks about time in Iceland between 1837 and 1908.
 
     Some more zones have been turned into links, when they differed
-    from existing zones only for older time stamps.  As usual,
-    these changes affect UT offsets in pre-1970 time stamps only.
+    from existing zones only for older timestamps.  As usual,
+    these changes affect UT offsets in pre-1970 timestamps only.
     Their old contents have been moved to the 'backzone' file.
     The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
     and Asia/Muscat.
@@ -1481,15 +1647,15 @@
 
 Release 2014j - 2014-11-10 17:37:11 -0800
 
-  Changes affecting current and future time stamps
+  Changes affecting current and future timestamps
 
     Turks & Caicos' switch from US eastern time to UT -04 year-round
     did not occur on 2014-11-02 at 02:00.  It's currently scheduled
     for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
-    Many pre-1989 time stamps have been corrected for Asia/Seoul and
+    Many pre-1989 timestamps have been corrected for Asia/Seoul and
     Asia/Pyongyang, based on sources for the Korean-language Wikipedia
     entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
     longer guess that Pyongyang mimicked Seoul time after World War II,
@@ -1496,8 +1662,8 @@
     as this is politically implausible.
 
     Some more zones have been turned into links, when they differed
-    from existing zones only for older time stamps.  As usual,
-    these changes affect UT offsets in pre-1970 time stamps only.
+    from existing zones only for older timestamps.  As usual,
+    these changes affect UT offsets in pre-1970 timestamps only.
     Their old contents have been moved to the 'backzone' file.
     The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
     Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
@@ -1512,7 +1678,7 @@
 
 Release 2014i - 2014-10-21 22:04:57 -0700
 
-  Changes affecting future time stamps
+  Changes affecting future timestamps
 
     Pacific/Fiji will observe DST from 2014-11-02 02:00 to 2015-01-18 03:00.
     (Thanks to Ken Rylander for the heads-up.)  Guess that future
@@ -1532,9 +1698,9 @@
     The new abbreviation IDT stands for the pre-1976 use of UT +08 in
     Indochina, to distinguish it better from ICT (+07).
 
-  Changes affecting past time stamps
+  Changes affecting past timestamps
 
-    Many time stamps have been corrected for Asia/Ho_Chi_Minh before 1976
+    Many timestamps have been corrected for Asia/Ho_Chi_Minh before 1976
     (thanks to Trần Ngọc Quân for an indirect pointer to Trần Tiến Bình's
     authoritative book).  Asia/Ho_Chi_Minh has been added to
     zone1970.tab, to give tzselect users in Vietnam two choices,
@@ -1541,8 +1707,8 @@
     since north and south Vietnam disagreed after our 1970 cutoff.
 
     Asia/Phnom_Penh and Asia/Vientiane have been turned into links, as
-    they differed from existing zones only for older time stamps.  As
-    usual, these changes affect pre-1970 time stamps only.  Their old
+    they differed from existing zones only for older timestamps.  As
+    usual, these changes affect pre-1970 timestamps only.  Their old
     contents have been moved to the 'backzone' file.
 
   Changes affecting code
@@ -1682,7 +1848,7 @@
 
     Unless NETBSD_INSPIRED is defined to 0, the tz library now
     supplies functions for creating and using objects that represent
-    time zones. The new functions are tzalloc, tzfree, localtime_rz,
+    timezones. The new functions are tzalloc, tzfree, localtime_rz,
     mktime_z, and (if STD_INSPIRED is also defined) posix2time_z and
     time2posix_z.  They are intended for performance: for example,
     localtime_rz (unlike localtime_r) is trivially thread-safe without
@@ -1696,7 +1862,7 @@
     TZDOBJS=zdump.o CHECK_TIME_T_ALTERNATIVES='.
 
     zdump now uses localtime_rz if available, as it's significantly faster,
-    and it can help zdump better diagnose invalid time zone names.
+    and it can help zdump better diagnose invalid timezone names.
     Define HAVE_LOCALTIME_RZ to 0 to suppress this.  HAVE_LOCALTIME_RZ
     defaults to 1 if NETBSD_INSPIRED && USE_LTZ.  When localtime_rz is
     not available, zdump now uses localtime_r and tzset if available,
@@ -1712,7 +1878,7 @@
     invalid or outlandish input.
 
     The tz library no longer mishandles leap seconds on platforms with
-    unsigned time_t in time zones that lack ordinary transitions after 1970.
+    unsigned time_t in timezones that lack ordinary transitions after 1970.
 
     The tz code now attempts to infer TM_GMTOFF and TM_ZONE if not
     already defined, to make it easier to configure on common platforms.
@@ -2036,8 +2202,8 @@
   Changes affecting code
 
     zic no longer generates files containing timestamps before the Big Bang.
-    This works around GNOME bug 730332
-    <https://bugzilla.gnome.org/show_bug.cgi?id=730332>.
+    This works around GNOME glib bug 878
+    <https://gitlab.gnome.org/GNOME/glib/issues/878>
     (Thanks to Leonardo Chiquitto for reporting the bug, and to
     Arthur David Olson and James Cloos for suggesting improvements to the fix.)
 
@@ -3490,7 +3656,7 @@
   These reflect changes to limit the length of time zone abbreviations
   and the characters used in those abbreviations.
 
-  There are also changes to handle POSIX-style "quoted" time zone
+  There are also changes to handle POSIX-style "quoted" timezone
   environment variables.
 
   The changes were circulated on the time zone mailing list; the only
@@ -3816,7 +3982,7 @@
 Release 1999e - 1999-08-17 15:20:54 -0400
 
   changes circulated by Paul Eggert, although the change to handling
-  of DST-specifying time zone names has been commented out for now
+  of DST-specifying timezone names has been commented out for now
   (search for "XXX" in "localtime.c" for details).  These files also
   do not make any changes to the start of DST in Brazil.
 
@@ -3941,7 +4107,7 @@
 
 Release code1997h-data1997j - 1997-12-18 17:47:35 -0500
 
-  minor changes to put "TZif" at the start of each time zone information file
+  minor changes to put "TZif" at the start of each timezone information file
 
   a rule has also been added to the Makefile so you can
 	make zones
@@ -4451,8 +4617,8 @@
 Release timestamps are taken from the release's commit (for newer,
 Git-based releases), from the newest file in the tarball (for older
 releases, where this info is available) or from the email announcing
-the release (if all else fails; these are marked with a time zone of
--0000 and an "is missing!" comment).
+the release (if all else fails; these are marked with a time zone
+abbreviation of -0000 and an "is missing!" comment).
 
 Earlier versions of the code and data were not announced on the tz
 list and are not summarized here.
--- contrib/tzdata/README.orig
+++ contrib/tzdata/README
@@ -4,7 +4,7 @@
 "Any time you want it to be." -- Frank Baxter as The Scientist
 					(from the Bell System film "About Time")
 
-The Time Zone Database (often called tz or zoneinfo) contains code and
+The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
 data that represent the history of local time for many representative
 locations around the globe.  It is updated periodically to reflect
 changes made by political bodies to time zone boundaries, UTC offsets,
@@ -20,17 +20,15 @@
 	make TOPDIR=$HOME/tzdir install
 	$HOME/tzdir/usr/bin/zdump -v America/Los_Angeles
 
-Historical local time information has been included here to:
+This database of historical local time information has several goals:
 
-*	provide a compendium of data about the history of civil time
-	that is useful even if not 100% accurate;
+ * Provide a compendium of data about the history of civil time that
+   is useful even if not 100% accurate.
 
-*	give an idea of the variety of local time rules that have
-	existed in the past and thus an idea of the variety that may be
-	expected in the future;
+ * Give an idea of the variety of local time rules that have existed
+   in the past and thus may be expected in the future.
 
-*	provide a test of the generality of the local time rule description
-	system.
+ * Test the generality of the local time rule description system.
 
 The information in the time zone data files is by no means authoritative;
 fixes and enhancements are welcome.  Please see the file CONTRIBUTING
--- contrib/tzdata/africa.orig
+++ contrib/tzdata/africa
@@ -1,3 +1,5 @@
+# tzdb data for Africa and environs
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -6,7 +8,7 @@
 # tz@iana.org for general use in the future).  For more, please see
 # the file CONTRIBUTING in the tz distribution.
 
-# From Paul Eggert (2017-04-09):
+# From Paul Eggert (2018-05-27):
 #
 # Unless otherwise specified, the source for data through 1990 is:
 # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -51,13 +53,15 @@
 # I vaguely recall 'WAT' also being used for -01 in the past but
 # cannot now come up with solid citations.
 #
-# I invented the following abbreviations; corrections are welcome!
-#	 +02	WAST	West Africa Summer Time (no longer used)
-#	 +03	CAST	Central Africa Summer Time (no longer used)
-#	 +03	SAST	South Africa Summer Time (no longer used)
+# I invented the following abbreviations in the 1990s:
+#	 +02	WAST	West Africa Summer Time
+#	 +03	CAST	Central Africa Summer Time
+#	 +03	SAST	South Africa Summer Time
 #	 +03	EAT	East Africa Time
-# 'EAT' also seems to have caught on; the others are rare but are paired
-# with better-attested non-DST abbreviations.
+# 'EAT' seems to have caught on and is in current timestamps, and though
+# the other abbreviations are rarer and are only in past timestamps,
+# they are paired with better-attested non-DST abbreviations.
+# Corrections are welcome.
 
 # Algeria
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -362,6 +366,13 @@
 # Eritrea
 # Ethiopia
 # See Africa/Nairobi.
+#
+# Unfortunately tzdb records only Western clock time in use in Ethiopia,
+# as the tzdb format is not up to properly recording a common Ethiopian
+# timekeeping practice that is based on solar time.  See:
+# Mortada D. If you have a meeting in Ethiopia, you'd better double
+# check the time. PRI's The World. 2015-01-30 15:15 -05.
+# https://www.pri.org/stories/2015-01-30/if-you-have-meeting-ethiopia-you-better-double-check-time
 
 # Gabon
 # See Africa/Lagos.
@@ -833,94 +844,61 @@
 # <https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
 # with the patch.
 
-# From Paul Eggert (2015-06-08):
-# For now, guess that later spring and fall transitions will use 2015's rules,
-# and guess that Morocco will switch to standard time at 03:00 the last
-# Sunday before Ramadan, and back to DST at 02:00 the first Sunday after
-# Ramadan.  To implement this, transition dates for 2016 through 2037 were
-# determined by running the following program under GNU Emacs 24.3, with the
-# results integrated by hand into the table below.
-# (let ((islamic-year 1437))
-#   (require 'cal-islam)
-#   (while (< islamic-year 1460)
-#     (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year)))
-#           (b (calendar-islamic-to-absolute (list 10 1 islamic-year)))
-#           (sunday 0))
-#       (while (/= sunday (mod (setq a (1- a)) 7)))
-#       (while (/= sunday (mod b 7))
-#         (setq b (1+ b)))
-#       (setq a (calendar-gregorian-from-absolute a))
-#       (setq b (calendar-gregorian-from-absolute b))
-#       (insert
-#        (format
-#         (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n"
-#                 "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n")
-#         (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a))
-#         (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
-#     (setq islamic-year (+ 1 islamic-year))))
+# From Mohamed Essedik Najd (2018-10-26):
+# Today, a Moroccan government council approved the perpetual addition
+# of 60 minutes to the regular Moroccan timezone.
+# From Brian Inglis (2018-10-26):
+# http://www.maroc.ma/fr/actualites/le-conseil-de-gouvernement-adopte-un-projet-de-decret-relatif-lheure-legale-stipulant-le
 
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-
-Rule	Morocco	1939	only	-	Sep	12	 0:00	1:00	S
+Rule	Morocco	1939	only	-	Sep	12	 0:00	1:00	-
 Rule	Morocco	1939	only	-	Nov	19	 0:00	0	-
-Rule	Morocco	1940	only	-	Feb	25	 0:00	1:00	S
+Rule	Morocco	1940	only	-	Feb	25	 0:00	1:00	-
 Rule	Morocco	1945	only	-	Nov	18	 0:00	0	-
-Rule	Morocco	1950	only	-	Jun	11	 0:00	1:00	S
+Rule	Morocco	1950	only	-	Jun	11	 0:00	1:00	-
 Rule	Morocco	1950	only	-	Oct	29	 0:00	0	-
-Rule	Morocco	1967	only	-	Jun	 3	12:00	1:00	S
+Rule	Morocco	1967	only	-	Jun	 3	12:00	1:00	-
 Rule	Morocco	1967	only	-	Oct	 1	 0:00	0	-
-Rule	Morocco	1974	only	-	Jun	24	 0:00	1:00	S
+Rule	Morocco	1974	only	-	Jun	24	 0:00	1:00	-
 Rule	Morocco	1974	only	-	Sep	 1	 0:00	0	-
-Rule	Morocco	1976	1977	-	May	 1	 0:00	1:00	S
+Rule	Morocco	1976	1977	-	May	 1	 0:00	1:00	-
 Rule	Morocco	1976	only	-	Aug	 1	 0:00	0	-
 Rule	Morocco	1977	only	-	Sep	28	 0:00	0	-
-Rule	Morocco	1978	only	-	Jun	 1	 0:00	1:00	S
+Rule	Morocco	1978	only	-	Jun	 1	 0:00	1:00	-
 Rule	Morocco	1978	only	-	Aug	 4	 0:00	0	-
-Rule	Morocco	2008	only	-	Jun	 1	 0:00	1:00	S
+Rule	Morocco	2008	only	-	Jun	 1	 0:00	1:00	-
 Rule	Morocco	2008	only	-	Sep	 1	 0:00	0	-
-Rule	Morocco	2009	only	-	Jun	 1	 0:00	1:00	S
+Rule	Morocco	2009	only	-	Jun	 1	 0:00	1:00	-
 Rule	Morocco	2009	only	-	Aug	21	 0:00	0	-
-Rule	Morocco	2010	only	-	May	 2	 0:00	1:00	S
+Rule	Morocco	2010	only	-	May	 2	 0:00	1:00	-
 Rule	Morocco	2010	only	-	Aug	 8	 0:00	0	-
-Rule	Morocco	2011	only	-	Apr	 3	 0:00	1:00	S
+Rule	Morocco	2011	only	-	Apr	 3	 0:00	1:00	-
 Rule	Morocco	2011	only	-	Jul	31	 0:00	0	-
-Rule	Morocco	2012	2013	-	Apr	lastSun	 2:00	1:00	S
+Rule	Morocco	2012	2013	-	Apr	lastSun	 2:00	1:00	-
 Rule	Morocco	2012	only	-	Jul	20	 3:00	0	-
-Rule	Morocco	2012	only	-	Aug	20	 2:00	1:00	S
+Rule	Morocco	2012	only	-	Aug	20	 2:00	1:00	-
 Rule	Morocco	2012	only	-	Sep	30	 3:00	0	-
 Rule	Morocco	2013	only	-	Jul	 7	 3:00	0	-
-Rule	Morocco	2013	only	-	Aug	10	 2:00	1:00	S
-Rule	Morocco	2013	max	-	Oct	lastSun	 3:00	0	-
-Rule	Morocco	2014	2021	-	Mar	lastSun	 2:00	1:00	S
+Rule	Morocco	2013	only	-	Aug	10	 2:00	1:00	-
+Rule	Morocco	2013	2018	-	Oct	lastSun	 3:00	0	-
+Rule	Morocco	2014	2018	-	Mar	lastSun	 2:00	1:00	-
 Rule	Morocco	2014	only	-	Jun	28	 3:00	0	-
-Rule	Morocco	2014	only	-	Aug	 2	 2:00	1:00	S
+Rule	Morocco	2014	only	-	Aug	 2	 2:00	1:00	-
 Rule	Morocco	2015	only	-	Jun	14	 3:00	0	-
-Rule	Morocco	2015	only	-	Jul	19	 2:00	1:00	S
+Rule	Morocco	2015	only	-	Jul	19	 2:00	1:00	-
 Rule	Morocco	2016	only	-	Jun	 5	 3:00	0	-
-Rule	Morocco	2016	only	-	Jul	10	 2:00	1:00	S
+Rule	Morocco	2016	only	-	Jul	10	 2:00	1:00	-
 Rule	Morocco	2017	only	-	May	21	 3:00	0	-
-Rule	Morocco	2017	only	-	Jul	 2	 2:00	1:00	S
+Rule	Morocco	2017	only	-	Jul	 2	 2:00	1:00	-
 Rule	Morocco	2018	only	-	May	13	 3:00	0	-
-Rule	Morocco	2018	only	-	Jun	17	 2:00	1:00	S
-Rule	Morocco	2019	only	-	May	 5	 3:00	0	-
-Rule	Morocco	2019	only	-	Jun	 9	 2:00	1:00	S
-Rule	Morocco	2020	only	-	Apr	19	 3:00	0	-
-Rule	Morocco	2020	only	-	May	24	 2:00	1:00	S
-Rule	Morocco	2021	only	-	Apr	11	 3:00	0	-
-Rule	Morocco	2021	only	-	May	16	 2:00	1:00	S
-Rule	Morocco	2022	only	-	May	 8	 2:00	1:00	S
-Rule	Morocco	2023	only	-	Apr	23	 2:00	1:00	S
-Rule	Morocco	2024	only	-	Apr	14	 2:00	1:00	S
-Rule	Morocco	2025	only	-	Apr	 6	 2:00	1:00	S
-Rule	Morocco	2026	max	-	Mar	lastSun	 2:00	1:00	S
-Rule	Morocco	2036	only	-	Oct	19	 3:00	0	-
-Rule	Morocco	2037	only	-	Oct	 4	 3:00	0	-
+Rule	Morocco	2018	only	-	Jun	17	 2:00	1:00	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
-			 0:00	Morocco	WE%sT	1984 Mar 16
-			 1:00	-	CET	1986
-			 0:00	Morocco	WE%sT
+			 0:00	Morocco	+00/+01	1984 Mar 16
+			 1:00	-	+01	1986
+			 0:00	Morocco	+00/+01	2018 Oct 27
+			 1:00	-	+01
 
 # Western Sahara
 #
@@ -935,7 +913,8 @@
 
 Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan # El Aaiún
 			-1:00	-	-01	1976 Apr 14
-			 0:00	Morocco	WE%sT
+			 0:00	Morocco	+00/+01	2018 Oct 27
+			 1:00	-	+01
 
 # Mozambique
 #
--- contrib/tzdata/antarctica.orig
+++ contrib/tzdata/antarctica
@@ -1,3 +1,5 @@
+# tzdb data for Antarctica and environs
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- contrib/tzdata/asia.orig
+++ contrib/tzdata/asia
@@ -1,3 +1,5 @@
+# tzdb data for Asia and environs
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -6,7 +8,7 @@
 # tz@iana.org for general use in the future).  For more, please see
 # the file CONTRIBUTING in the tz distribution.
 
-# From Paul Eggert (2017-01-13):
+# From Paul Eggert (2018-06-19):
 #
 # Unless otherwise specified, the source for data through 1990 is:
 # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -35,7 +37,8 @@
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# The following alphabetic abbreviations appear in these tables:
+# The following alphabetic abbreviations appear in these tables
+# (corrections are welcome):
 #	     std  dst
 #	     LMT	Local Mean Time
 #	2:00 EET  EEST	Eastern European Time
@@ -44,11 +47,13 @@
 #	7:00 WIB	west Indonesia (Waktu Indonesia Barat)
 #	8:00 WITA	central Indonesia (Waktu Indonesia Tengah)
 #	8:00 CST	China
+#	8:00 PST  PDT*	Philippine Standard Time
 #	8:30 KST  KDT	Korea when at +0830
 #	9:00 WIT	east Indonesia (Waktu Indonesia Timur)
 #	9:00 JST  JDT	Japan
 #	9:00 KST  KDT	Korea when at +09
 #	9:30 ACST	Australian Central Standard Time
+# *I invented the abbreviation PDT; see "Philippines" below.
 # Otherwise, these tables typically use numeric abbreviations like +03
 # and +0330 for integer hour and minute UT offsets.  Although earlier
 # editions invented alphabetic time zone abbreviations for every
@@ -281,6 +286,29 @@
 
 # China
 
+# From Paul Eggert (2018-10-02):
+# The following comes from Table 1 of:
+# Li Yu. Research on the daylight saving movement in 1940s Shanghai.
+# Nanjing Journal of Social Sciences. 2014;(2):144-50.
+# http://oversea.cnki.net/kns55/detail.aspx?dbname=CJFD2014&filename=NJSH201402020
+# The table lists dates only; I am guessing 00:00 and 24:00 transition times.
+# Also, the table lists the planned end of DST in 1949, but the corresponding
+# zone line cuts this off on May 28, when the Communists took power.
+#
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Shang	1940	only	-	Jun	 1	 0:00	1:00	D
+Rule	Shang	1940	only	-	Oct	12	24:00	0	S
+Rule	Shang	1941	only	-	Mar	15	 0:00	1:00	D
+Rule	Shang	1941	only	-	Nov	 1	24:00	0	S
+Rule	Shang	1942	only	-	Jan	31	 0:00	1:00	D
+Rule	Shang	1945	only	-	Sep	 1	24:00	0	S
+Rule	Shang	1946	only	-	May	15	 0:00	1:00	D
+Rule	Shang	1946	only	-	Sep	30	24:00	0	S
+Rule	Shang	1947	only	-	Apr	15	 0:00	1:00	D
+Rule	Shang	1947	only	-	Oct	31	24:00	0	S
+Rule	Shang	1948	1949	-	May	 1	 0:00	1:00	D
+Rule	Shang	1948	1949	-	Sep	30	24:00	0	S #plan
+
 # From Guy Harris:
 # People's Republic of China.  Yes, they really have only one time zone.
 
@@ -307,18 +335,33 @@
 # time - sort of", Los Angeles Times, 1986-05-05 ... [says] that China began
 # observing daylight saving time in 1986.
 
-# From Paul Eggert (2014-06-30):
-# Shanks & Pottenger have China switching to a single time zone in 1980, but
-# this doesn't seem to be correct.  They also write that China observed summer
-# DST from 1986 through 1991, which seems to match the above commentary, so
-# go with them for DST rules as follows:
+# From P Chan (2018-05-07):
+# The start and end time of DST in China [from 1986 on] should be 2:00
+# (i.e. 2:00 to 3:00 at the start and 2:00 to 1:00 at the end)....
+# Government notices about summer time:
+#
+# 1986-04-12 http://www.zj.gov.cn/attach/zfgb/198608.pdf p.21-22
+# (To establish summer time from 1986. On 4 May, set the clocks ahead one hour
+# at 2 am. On 14 September, set the clocks backward one hour at 2 am.)
+#
+# 1987-02-15 http://www.gov.cn/gongbao/shuju/1987/gwyb198703.pdf p.114
+# (Summer time in 1987 to start from 12 April until 13 September)
+#
+# 1987-09-09 http://www.gov.cn/gongbao/shuju/1987/gwyb198721.pdf p.709
+# (From 1988, summer time to start from 2 am of the first Sunday of mid-April
+# until 2 am of the first Sunday of mid-September)
+#
+# 1992-03-03 http://www.gov.cn/gongbao/shuju/1992/gwyb199205.pdf p.152
+# (To suspend summer time from 1992)
+#
+# The first page of People's Daily on 12 April 1988 stating that summer time
+# to begin on 17 April.
+# http://data.people.com.cn/pic/101p/1988/04/1988041201.jpg
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Shang	1940	only	-	Jun	 3	0:00	1:00	D
-Rule	Shang	1940	1941	-	Oct	 1	0:00	0	S
-Rule	Shang	1941	only	-	Mar	16	0:00	1:00	D
-Rule	PRC	1986	only	-	May	 4	0:00	1:00	D
-Rule	PRC	1986	1991	-	Sep	Sun>=11	0:00	0	S
-Rule	PRC	1987	1991	-	Apr	Sun>=10	0:00	1:00	D
+Rule	PRC	1986	only	-	May	 4	 2:00	1:00	D
+Rule	PRC	1986	1991	-	Sep	Sun>=11	 2:00	0	S
+Rule	PRC	1987	1991	-	Apr	Sun>=11	 2:00	1:00	D
 
 # From Anthony Fok (2001-12-20):
 # BTW, I did some research on-line and found some info regarding these five
@@ -340,10 +383,11 @@
 # Alois Treindl kindly sent me translations of the following two sources:
 #
 # (1)
-# Guo Qingsheng (National Time-Service Center, CAS, Xi'an 710600, China)
+# Guo Qing-sheng (National Time-Service Center, CAS, Xi'an 710600, China)
 # Beijing Time at the Beginning of the PRC
 # China Historical Materials of Science and Technology
-# (Zhongguo ke ji shi liao, 中国科技史料), Vol. 24, No. 1 (2003)
+# (Zhongguo ke ji shi liao, 中国科技史料). 2003;24(1):5-9.
+# http://oversea.cnki.net/kcms/detail/detail.aspx?filename=ZGKS200301000&dbname=CJFD2003
 # It gives evidence that at the beginning of the PRC, Beijing time was
 # officially apparent solar time!  However, Guo also says that the
 # evidence is dubious, as the relevant institute of astronomy had not
@@ -520,7 +564,7 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Beijing time, used throughout China; represented by Shanghai.
 Zone	Asia/Shanghai	8:05:43	-	LMT	1901
-			8:00	Shang	C%sT	1949
+			8:00	Shang	C%sT	1949 May 28
 			8:00	PRC	C%sT
 # Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi
 # / Wulumuqi.  (Please use Asia/Shanghai if you prefer Beijing time.)
@@ -749,24 +793,140 @@
 			8:00	Taiwan	C%sT
 
 # Macau (Macao, Aomen)
+#
+# From P Chan (2018-05-10):
+# * LegisMac
+#   http://legismac.safp.gov.mo/legismac/descqry/Descqry.jsf?lang=pt
+#   A database for searching titles of legal documents of Macau in
+#   Chinese and Portuguese.  The term "HORÁRIO DE VERÃO" can be used for
+#   searching decrees about summer time.
+# * Archives of Macao
+#   http://www.archives.gov.mo/en/bo/
+#   It contains images of old official gazettes.
+# * The Macao Meteorological and Geophysical Bureau have a page listing the
+#   summer time history.  But it is not complete and has some mistakes.
+#   http://www.smg.gov.mo/smg/geophysics/e_t_Summer%20Time.htm
+# Macau adopted GMT+8 on 30 Oct 1904 to follow Hong Kong.  Clocks were
+# advanced by 25 minutes and 50 seconds.  Which means the LMT used was
+# +7:34:10.  As stated in the "Portaria No. 204" dated 21 October 1904
+# and published in the Official Gazette on 29 October 1904.
+# http://igallery.icm.gov.mo/Images/Archives/BO/MO_AH_PUB_BO_1904_10/MO_AH_PUB_BO_1904_10_00025_Grey.JPG
+#
+# Therefore the 1911 decree of Portugal did not change time in Macau.
+#
+# From LegisMac, here is a list of decrees that changed the time ...
+# [Decree Gazette-no. date; titles omitted in this quotation]
+#	DIL 732 BOCM 51 1941.12.20
+#	DIL 764 BOCM 9S 1942.04.30
+#	DIL 781 BOCM 21 1942.10.10
+#	PT 3434 BOCM 8S 1943.04.17
+#	PT 3504 BOCM 20 1943.09.25
+#	PT 3843 BOCM 39 1945.09.29
+#	PT 3961 BOCM 17 1946.04.27
+#	PT 4026 BOCM 39 1946.09.28
+#	PT 4153 BOCM 16 1947.04.10
+#	PT 4271 BOCM 48 1947.11.29
+#	PT 4374 BOCM 18 1948.05.01
+#	PT 4465 BOCM 44 1948.10.30
+#	PT 4590 BOCM 14 1949.04.02
+#	PT 4666 BOCM 44 1949.10.29
+#	PT 4771 BOCM 12 1950.03.25
+#	PT 4838 BOCM 43 1950.10.28
+#	PT 4946 BOCM 12 1951.03.24
+#	PT 5025 BO 43 1951.10.27
+#	PT 5149 BO 14 1952.04.05
+#	PT 5251 BO 43 1952.10.25
+#	PT 5366 BO 13 1953.03.28
+#	PT 5444 BO 44 1953.10.31
+#	PT 5540 BO 12 1954.03.20
+#	PT 5589 BO 44 1954.10.30
+#	PT 5676 BO 12 1955.03.19
+#	PT 5739 BO 45 1955.11.05
+#	PT 5823 BO 11 1956.03.17
+#	PT 5891 BO 44 1956.11.03
+#	PT 5981 BO 12 1957.03.23
+#	PT 6064 BO 43 1957.10.26
+#	PT 6172 BO 12 1958.03.22
+#	PT 6243 BO 43 1958.10.25
+#	PT 6341 BO 12 1959.03.21
+#	PT 6411 BO 43 1959.10.24
+#	PT 6514 BO 11 1960.03.12
+#	PT 6584 BO 44 1960.10.29
+#	PT 6721 BO 10 1961.03.11
+#	PT 6815 BO 43 1961.10.28
+#	PT 6947 BO 10 1962.03.10
+#	PT 7080 BO 43 1962.10.27
+#	PT 7218 BO 12 1963.03.23
+#	PT 7340 BO 43 1963.10.26
+#	PT 7491 BO 11 1964.03.14
+#	PT 7664 BO 43 1964.10.24
+#	PT 7846 BO 15 1965.04.10
+#	PT 7979 BO 42 1965.10.16
+#	PT 8146 BO 15 1966.04.09
+#	PT 8252 BO 41 1966.10.08
+#	PT 8429 BO 15 1967.04.15
+#	PT 8540 BO 41 1967.10.14
+#	PT 8735 BO 15 1968.04.13
+#	PT 8860 BO 41 1968.10.12
+#	PT 9035 BO 16 1969.04.19
+#	PT 9156 BO 42 1969.10.18
+#	PT 9328 BO 15 1970.04.11
+#	PT 9418 BO 41 1970.10.10
+#	PT 9587 BO 14 1971.04.03
+#	PT 9702 BO 41 1971.10.09
+#	PT 38-A/72 BO 14 1972.04.01
+#	PT 126-A/72 BO 41 1972.10.07
+#	PT 61/73 BO 14 1973.04.07
+#	PT 182/73 BO 40 1973.10.06
+#	PT 282/73 BO 51 1973.12.22
+#	PT 177/74 BO 41 1974.10.12
+#	PT 51/75 BO 15 1975.04.12
+#	PT 173/75 BO 41 1975.10.11
+#	PT 67/76/M BO 14 1976.04.03
+#	PT 169/76/M BO 41 1976.10.09
+#	PT 78/79/M BO 19 1979.05.12
+#	PT 166/79/M BO 42 1979.10.20
+# Note that DIL 732 does not belong to "HORÁRIO DE VERÃO" according to
+# LegisMac.... Note that between 1942 and 1945, the time switched
+# between GMT+9 and GMT+10.  Also in 1965 and 1965 the DST ended at 2:30am.
+
+# From Paul Eggert (2018-05-10):
+# The 1904 decree says that Macau changed from the meridian of
+# Fortaleza do Monte, presumably the basis for the 7:34:10 for LMT.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Macau	1961	1962	-	Mar	Sun>=16	3:30	1:00	D
-Rule	Macau	1961	1964	-	Nov	Sun>=1	3:30	0	S
-Rule	Macau	1963	only	-	Mar	Sun>=16	0:00	1:00	D
-Rule	Macau	1964	only	-	Mar	Sun>=16	3:30	1:00	D
-Rule	Macau	1965	only	-	Mar	Sun>=16	0:00	1:00	D
-Rule	Macau	1965	only	-	Oct	31	0:00	0	S
-Rule	Macau	1966	1971	-	Apr	Sun>=16	3:30	1:00	D
-Rule	Macau	1966	1971	-	Oct	Sun>=16	3:30	0	S
-Rule	Macau	1972	1974	-	Apr	Sun>=15	0:00	1:00	D
-Rule	Macau	1972	1973	-	Oct	Sun>=15	0:00	0	S
-Rule	Macau	1974	1977	-	Oct	Sun>=15	3:30	0	S
-Rule	Macau	1975	1977	-	Apr	Sun>=15	3:30	1:00	D
-Rule	Macau	1978	1980	-	Apr	Sun>=15	0:00	1:00	D
-Rule	Macau	1978	1980	-	Oct	Sun>=15	0:00	0	S
-# See Europe/Lisbon for info about the 1912 transition.
+Rule	Macau	1942	1943	-	Apr	30	23:00	1:00	-
+Rule	Macau	1942	only	-	Nov	17	23:00	0	-
+Rule	Macau	1943	only	-	Sep	30	23:00	0	S
+Rule	Macau	1946	only	-	Apr	30	23:00s	1:00	D
+Rule	Macau	1946	only	-	Sep	30	23:00s	0	S
+Rule	Macau	1947	only	-	Apr	19	23:00s	1:00	D
+Rule	Macau	1947	only	-	Nov	30	23:00s	0	S
+Rule	Macau	1948	only	-	May	 2	23:00s	1:00	D
+Rule	Macau	1948	only	-	Oct	31	23:00s	0	S
+Rule	Macau	1949	1950	-	Apr	Sat>=1	23:00s	1:00	D
+Rule	Macau	1949	1950	-	Oct	lastSat	23:00s	0	S
+Rule	Macau	1951	only	-	Mar	31	23:00s	1:00	D
+Rule	Macau	1951	only	-	Oct	28	23:00s	0	S
+Rule	Macau	1952	1953	-	Apr	Sat>=1	23:00s	1:00	D
+Rule	Macau	1952	only	-	Nov	 1	23:00s	0	S
+Rule	Macau	1953	1954	-	Oct	lastSat	23:00s	0	S
+Rule	Macau	1954	1956	-	Mar	Sat>=17	23:00s	1:00	D
+Rule	Macau	1955	only	-	Nov	 5	23:00s	0	S
+Rule	Macau	1956	1964	-	Nov	Sun>=1	03:30	0	S
+Rule	Macau	1957	1964	-	Mar	Sun>=18	03:30	1:00	D
+Rule	Macau	1965	1973	-	Apr	Sun>=16	03:30	1:00	D
+Rule	Macau	1965	1966	-	Oct	Sun>=16	02:30	0	S
+Rule	Macau	1967	1976	-	Oct	Sun>=16	03:30	0	S
+Rule	Macau	1973	only	-	Dec	30	03:30	1:00	D
+Rule	Macau	1975	1976	-	Apr	Sun>=16	03:30	1:00	D
+Rule	Macau	1979	only	-	May	13	03:30	1:00	D
+Rule	Macau	1979	only	-	Oct	Sun>=16	03:30	0	S
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Macau	7:34:20 -	LMT	1911 Dec 31 16:00u
+Zone	Asia/Macau	7:34:10 -	LMT	1904 Oct 30
+			8:00	-	CST	1941 Dec 21 23:00
+			9:00	Macau	+09/+10	1945 Sep 30 24:00
 			8:00	Macau	C%sT
 
 
@@ -1471,9 +1631,29 @@
 # http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00719500331039.htm
 # ... In summary, it is written as follows.  From 24:00 on the first Saturday
 # in May, until 0:00 on the day after the second Saturday in September.
+
+# From Phake Nick (2018-09-27):
+# [T]he webpage authored by National Astronomical Observatory of Japan
+# https://eco.mtk.nao.ac.jp/koyomi/wiki/BBFEB9EF2FB2C6BBFEB9EF.html
+# ... mentioned that using Showa 23 (year 1948) as example, 13pm of September
+# 11 in summer time will equal to 0am of September 12 in standard time.
+# It cited a document issued by the Liaison Office which briefly existed
+# during the postwar period of Japan, where the detail on implementation
+# of the summer time is described in the document.
+# https://eco.mtk.nao.ac.jp/koyomi/wiki/BBFEB9EF2FB2C6BBFEB9EFB2C6BBFEB9EFA4CEBCC2BBDCA4CBA4C4A4A4A4C6.pdf
+# The text in the document do instruct a fall back to occur at
+# September 11, 13pm in summer time, while ordinary citizens can
+# change the clock before they sleep.
+#
+# From Paul Eggert (2018-09-27):
+# This instruction is equivalent to "Sat>=8 25:00", so use that.  zic treats
+# it like "Sun>=9 01:00", which is not quite the same but is the best we can
+# do in any POSIX or C platform.  The "25:00" assumes zic from 2007 or later,
+# which should be safe now.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Japan	1948	only	-	May	Sat>=1	24:00	1:00	D
-Rule	Japan	1948	1951	-	Sep	Sun>=9	 0:00	0	S
+Rule	Japan	1948	1951	-	Sep	Sat>=8	25:00	0	S
 Rule	Japan	1949	only	-	Apr	Sat>=1	24:00	1:00	D
 Rule	Japan	1950	1951	-	May	Sat>=1	24:00	1:00	D
 
@@ -1855,7 +2035,7 @@
 			5:00	-	+05
 # Mangghystaū (KZ-MAN)
 # Aqtau was not founded until 1963, but it represents an inhabited region,
-# so include time stamps before 1963.
+# so include timestamps before 1963.
 Zone	Asia/Aqtau	3:21:04	-	LMT	1924 May  2
 			4:00	-	+04	1930 Jun 21
 			5:00	-	+05	1981 Oct  1
@@ -1995,6 +2175,10 @@
 # Assembly, as published in Rodong Sinmun.
 # From Tim Parenti (2018-04-29):
 # It appears to be the front page story at the top in the right-most column.
+#
+# From Paul Eggert (2018-05-04):
+# The BBC reported that the transition was from 23:30 to 24:00 today.
+# https://www.bbc.com/news/world-asia-44010705
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Seoul	8:27:52	-	LMT	1908 Apr  1
@@ -2007,7 +2191,7 @@
 			8:30	-	KST	1912 Jan  1
 			9:00	-	JST	1945 Aug 24
 			9:00	-	KST	2015 Aug 15 00:00
-			8:30	-	KST	2018 May  5
+			8:30	-	KST	2018 May  4 23:30
 			9:00	-	KST
 
 ###############################################################################
@@ -2757,19 +2941,35 @@
 # Philippine Star 2014-08-05
 # http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time
 
+# From Paul Goyette (2018-06-15):
+# In the Philippines, there is a national law, Republic Act No. 10535
+# which declares the official time here as "Philippine Standard Time".
+# The act [1] even specifies use of PST as the abbreviation, although
+# the FAQ provided by PAGASA [2] uses the "acronym PhST to distinguish
+# it from the Pacific Standard Time (PST)."
+# [1] http://www.officialgazette.gov.ph/2013/05/15/republic-act-no-10535/
+# [2] https://www1.pagasa.dost.gov.ph/index.php/astronomy/philippine-standard-time#republic-act-10535
+#
+# From Paul Eggert (2018-06-19):
+# I surveyed recent news reports, and my impression is that "PST" is
+# more popular among reliable English-language news sources.  This is
+# not just a measure of Google hit counts: it's also the sizes and
+# influence of the sources.  There is no current abbreviation for DST,
+# so use "PDT", the usual American style.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Phil	1936	only	-	Nov	1	0:00	1:00	-
-Rule	Phil	1937	only	-	Feb	1	0:00	0	-
-Rule	Phil	1954	only	-	Apr	12	0:00	1:00	-
-Rule	Phil	1954	only	-	Jul	1	0:00	0	-
-Rule	Phil	1978	only	-	Mar	22	0:00	1:00	-
-Rule	Phil	1978	only	-	Sep	21	0:00	0	-
+Rule	Phil	1936	only	-	Nov	1	0:00	1:00	D
+Rule	Phil	1937	only	-	Feb	1	0:00	0	S
+Rule	Phil	1954	only	-	Apr	12	0:00	1:00	D
+Rule	Phil	1954	only	-	Jul	1	0:00	0	S
+Rule	Phil	1978	only	-	Mar	22	0:00	1:00	D
+Rule	Phil	1978	only	-	Sep	21	0:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Manila	-15:56:00 -	LMT	1844 Dec 31
 			8:04:00 -	LMT	1899 May 11
-			8:00	Phil	+08/+09	1942 May
-			9:00	-	+09	1944 Nov
-			8:00	Phil	+08/+09
+			8:00	Phil	P%sT	1942 May
+			9:00	-	JST	1944 Nov
+			8:00	Phil	P%sT
 
 # Qatar
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -2780,9 +2980,9 @@
 
 # Saudi Arabia
 #
-# From Paul Eggert (2014-07-15):
+# From Paul Eggert (2018-08-29):
 # Time in Saudi Arabia and other countries in the Arabian peninsula was not
-# standardized until relatively recently; we don't know when, and possibly it
+# standardized until 1968 or so; we don't know exactly when, and possibly it
 # has never been made official.  Richard P Hunt, in "Islam city yielding to
 # modern times", New York Times (1961-04-09), p 20, wrote that only airlines
 # observed standard time, and that people in Jeddah mostly observed quasi-solar
@@ -2789,6 +2989,25 @@
 # time, doing so by setting their watches at sunrise to 6 o'clock (or to 12
 # o'clock for "Arab" time).
 #
+# Timekeeping differed depending on who you were and which part of Saudi
+# Arabia you were in.  In 1969, Elias Antar wrote that although a common
+# practice had been to set one's watch to 12:00 (i.e., midnight) at sunset -
+# which meant that the time on one side of a mountain could differ greatly from
+# the time on the other side - many foreigners set their watches to 6pm
+# instead, while airlines instead used UTC +03 (except in Dhahran, where they
+# used UTC +04), Aramco used UTC +03 with DST, and the Trans-Arabian Pipe Line
+# Company used Aramco time in eastern Saudi Arabia and airline time in western.
+# (The American Military Aid Advisory Group used plain UTC.)  Antar writes,
+# "A man named Higgins, so the story goes, used to run a local power
+# station. One day, the whole thing became too much for Higgins and he
+# assembled his staff and laid down the law. 'I've had enough of this,' he
+# shrieked. 'It is now 12 o'clock Higgins Time, and from now on this station is
+# going to run on Higgins Time.' And so, until last year, it did."  See:
+# Antar E. Dinner at When? Saudi Aramco World, 1969 March/April. 2-3.
+# http://archive.aramcoworld.com/issue/196902/dinner.at.when.htm
+# newspapers.com says a similar story about Higgins was published in the Port
+# Angeles (WA) Evening News, 1965-03-10, page 5, but I lack access to the text.
+#
 # The TZ database cannot represent quasi-solar time; airline time is the best
 # we can do.  The 1946 foreign air news digest of the U.S. Civil Aeronautics
 # Board (OCLC 42299995) reported that the "... Arabian Government, inaugurated
@@ -2798,7 +3017,8 @@
 #
 # Shanks & Pottenger also state that until 1968-05-01 Saudi Arabia had two
 # time zones; the other zone, at UT +04, was in the far eastern part of
-# the country.  Ignore this, as it's before our 1970 cutoff.
+# the country.  Presumably this is documenting airline time.  Ignore this,
+# as it's before our 1970 cutoff.
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Riyadh	3:06:52 -	LMT	1947 Mar 14
--- contrib/tzdata/australasia.orig
+++ contrib/tzdata/australasia
@@ -1,3 +1,5 @@
+# tzdb data for Australasia and environs, and for much of the Pacific
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -361,8 +363,15 @@
 # Dominic Fok writes (2017-08-20) that DST ends 2018-01-14, citing
 # Extraordinary Government of Fiji Gazette Supplement No. 21 (2017-08-27),
 # [Legal Notice No. 41] of an order of the previous day by J Usamate.
+
+# From Raymond Kumar (2018-07-13):
+# http://www.fijitimes.com/government-approves-2018-daylight-saving/
+# ... The daylight saving period will end at 3am on Sunday January 13, 2019.
+#
+# From Paul Eggert (2018-07-15):
 # For now, guess DST from 02:00 the first Sunday in November to 03:00
-# the first Sunday on or after January 14.  Although ad hoc, it matches
+# the first Sunday on or after January 13.  January transitions reportedly
+# depend on when school terms start.  Although the guess is ad hoc, it matches
 # transitions since late 2014 and seems more likely to match future
 # practice than guessing no DST.
 
@@ -376,7 +385,7 @@
 Rule	Fiji	2012	2013	-	Jan	Sun>=18	3:00	0	-
 Rule	Fiji	2014	only	-	Jan	Sun>=18	2:00	0	-
 Rule	Fiji	2014	max	-	Nov	Sun>=1	2:00	1:00	-
-Rule	Fiji	2015	max	-	Jan	Sun>=14	3:00	0	-
+Rule	Fiji	2015	max	-	Jan	Sun>=13	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26 # Suva
 			12:00	Fiji	+12/+13
--- contrib/tzdata/backward.orig
+++ contrib/tzdata/backward
@@ -1,7 +1,9 @@
+# tzdb links for backward compatibility
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
-# This file provides links between current names for time zones
+# This file provides links between current names for timezones
 # and their old names.  Many names changed in late 1993.
 
 # Link	TARGET			LINK-NAME
--- contrib/tzdata/backzone.orig
+++ contrib/tzdata/backzone
@@ -16,13 +16,13 @@
 # the file 'backward'.
 
 # Although zones in this file may be of some use for analyzing
-# pre-1970 time stamps, they are less reliable, cover only a tiny
+# pre-1970 timestamps, they are less reliable, cover only a tiny
 # sliver of the pre-1970 era, and cannot feasibly be improved to cover
 # most of the era.  Because the zones are out of normal scope for the
 # database, less effort is put into maintaining this file.  Many of
 # the zones were formerly in other source files, but were removed or
 # replaced by links as their data entries were questionable and/or they
-# differed from other zones only in pre-1970 time stamps.
+# differed from other zones only in pre-1970 timestamps.
 
 # Unless otherwise specified, the source for data through 1990 is:
 # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
--- contrib/tzdata/etcetera.orig
+++ contrib/tzdata/etcetera
@@ -1,9 +1,11 @@
+# tzdb data for ships at sea and other miscellany
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
 # These entries are mostly present for historical reasons, so that
 # people in areas not otherwise covered by the tz files could "zic -l"
-# to a time zone that was right for their area.  These days, the
+# to a timezone that was right for their area.  These days, the
 # tz files cover almost all the inhabited world, and the only practical
 # need now for the entries that are not on UTC are for ships at sea
 # that cannot use POSIX TZ settings.
--- contrib/tzdata/europe.orig
+++ contrib/tzdata/europe
@@ -1,3 +1,5 @@
+# tzdb data for Europe and environs
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -517,7 +519,7 @@
 #
 # To work around this problem, the build procedure can translate the
 # following data into two forms, one with negative SAVE values and the
-# other form with a traditional approximation for Irish time stamps
+# other form with a traditional approximation for Irish timestamps
 # after 1971-10-31 02:00 UTC; although this approximation has tm_isdst
 # flags that are reversed, its UTC offsets are correct and this often
 # suffices.  This source file currently uses only nonnegative SAVE
@@ -2427,6 +2429,33 @@
 # administratively part of Sakhalin oblast', they appear to have
 # remained on UTC+11 along with Magadan.
 
+# From Marat Nigametzianov (2018-07-16):
+# this is link to order from 1956 about timezone in USSR
+# http://astro.uni-altai.ru/~orion/blog/2011/11/novyie-granitsyi-chasovyih-poyasov-v-sssr/
+#
+# From Paul Eggert (2018-07-16):
+# Perhaps someone could translate the above-mentioned link and use it
+# to correct our data for the ex-Soviet Union.  It cites the following:
+# «Поясное время и новые границы часовых поясов» / сост. П.Н. Долгов,
+# отв. ред. Г.Д. Бурдун - М: Комитет стандартов, мер и измерительных
+# приборов при Совете Министров СССР, Междуведомственная комиссия
+# единой службы времени, 1956 г.
+# This book looks like it would be a helpful resource for the Soviet
+# Union through 1956.  Although a copy was in the Scientific Library
+# of Tomsk State University, I have not been able to track down a copy nearby.
+#
+# From Stepan Golosunov (2018-07-21):
+# http://astro.uni-altai.ru/~orion/blog/2015/05/center-reforma-ischisleniya-vremeni-br-na-territorii-sssr-v-1957-godu-center/
+# says that the 1956 decision to change time belts' borders was not
+# implemented as planned in 1956 and the change happened in 1957.
+# There is also the problem that actual time zones were different from
+# the official time belts (and from many time belts' maps) as there were
+# numerous exceptions to application of time belt rules.  For example,
+# https://ru.wikipedia.org/wiki/Московское_время#Перемещение_границы_применения_московского_времени_на_восток
+# says that by 1962 there were many regions in the 3rd time belt that
+# were on Moscow time, referring to a 1962 map.  By 1989 number of such
+# exceptions grew considerably.
+
 # From Tim Parenti (2014-07-06):
 # The comments detailing the coverage of each Russian zone are meant to assist
 # with maintenance only and represent our best guesses as to which regions
@@ -2437,9 +2466,6 @@
 # future stability.  ISO 3166-2:RU codes are also listed for first-level
 # divisions where available.
 
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-
-
 # From Tim Parenti (2014-07-03):
 # Europe/Kaliningrad covers...
 # 39	RU-KGD	Kaliningrad Oblast
@@ -2707,6 +2733,15 @@
 # 34	RU-VGG	Volgograd Oblast
 # The 1988 transition is from USSR act No. 5 (1988-01-04).
 
+# From Alexander Fetisov (2018-09-20):
+# Volgograd region in southern Russia (Europe/Volgograd) change
+# timezone from UTC+3 to UTC+4 from 28oct2018.
+# http://sozd.parliament.gov.ru/bill/452878-7
+#
+# From Stepan Golosunov (2018-10-11):
+# The law has been published today on
+# http://publication.pravo.gov.ru/Document/View/0001201810110037
+
 Zone Europe/Volgograd	 2:57:40 -	LMT	1920 Jan  3
 			 3:00	-	+03	1930 Jun 21
 			 4:00	-	+04	1961 Nov 11
@@ -2715,7 +2750,8 @@
 			 4:00	-	+04	1992 Mar 29  2:00s
 			 3:00	Russia	+03/+04	2011 Mar 27  2:00s
 			 4:00	-	+04	2014 Oct 26  2:00s
-			 3:00	-	+03
+			 3:00	-	+03	2018 Oct 28  2:00s
+			 4:00	-	+04
 
 # From Paul Eggert (2016-11-11):
 # Europe/Saratov covers:
@@ -3404,7 +3440,8 @@
 #Rule NatSpain	1937	only	-	May	22	23:00	1:00	S
 #Rule NatSpain	1937	1938	-	Oct	Sat>=1	24:00s	0	-
 #Rule NatSpain	1938	only	-	Mar	26	23:00	1:00	S
-# The following rules are copied from Morocco from 1967 through 1978.
+# The following rules are copied from Morocco from 1967 through 1978,
+# except with "S" letters.
 Rule SpainAfrica 1967	only	-	Jun	 3	12:00	1:00	S
 Rule SpainAfrica 1967	only	-	Oct	 1	 0:00	0	-
 Rule SpainAfrica 1974	only	-	Jun	24	 0:00	1:00	S
@@ -3424,6 +3461,7 @@
 			 0:00	1:00	WEST	1918 Oct  7 23:00
 			 0:00	-	WET	1924
 			 0:00	Spain	WE%sT	1929
+			 0:00	-	WET	1967 # Help zishrink.awk.
 			 0:00 SpainAfrica WE%sT	1984 Mar 16
 			 1:00	-	CET	1986
 			 1:00	EU	CE%sT
@@ -3609,7 +3647,7 @@
 # http://www.resmigazete.gov.tr/eskiler/2001/03/20010324.htm#2  - for 2001
 # http://www.resmigazete.gov.tr/eskiler/2002/03/20020316.htm#2  - for 2002-2006
 # From Paul Eggert (2016-09-25):
-# Prefer the above sources to Shanks & Pottenger for time stamps after 1985.
+# Prefer the above sources to Shanks & Pottenger for timestamps after 1985.
 
 # From Steffen Thorsen (2007-03-09):
 # Starting 2007 though, it seems that they are adopting EU's 1:00 UTC
@@ -3819,10 +3857,29 @@
 # * Ukrainian Government's Resolution of 20.03.1992, No. 139.
 # http://www.uazakon.com/documents/date_8u/pg_grcasa.htm
 
+# From Paul Eggert (2018-10-03):
+# As is usual in tzdb, Ukrainian zones use the most common English spellings.
+# For example, tzdb uses Europe/Kiev, as "Kiev" is the most common spelling in
+# English for Ukraine's capital, even though it is certainly wrong as a
+# transliteration of the Ukrainian "Київ".  This is similar to tzdb's use of
+# Europe/Prague, which is certainly wrong as a transliteration of the Czech
+# "Praha".  ("Kiev" came from old Slavic via Russian to English, and "Prague"
+# came from old Slavic via French to English, so the two cases have something
+# in common.)  Admittedly English-language spelling of Ukrainian names is
+# controversial, and some day "Kyiv" may become substantially more popular in
+# English; in the meantime, stick with the traditional English "Kiev" as that
+# means less disruption for our users.
+#
+# Anyway, none of the common English-language spellings (Kiev, Kyiv, Kieff,
+# Kijeff, Kijev, Kiyef, Kiyeff) do justice to the common pronunciation in
+# Ukrainian, namely [ˈkɪjiu̯] (IPA).  This pronunciation has nothing like an
+# English "v" or "f", and instead trails off with what an English-speaker
+# would call a demure "oo" sound, and it would would be better anglicized as
+# "Kuiyu".  Here's a sound file, if you would like to do as the Kuiyuvians do:
+# https://commons.wikimedia.org/wiki/File:Uk-Київ.ogg
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-# Most of Ukraine since 1970 has been like Kiev.
-# "Kyiv" is the transliteration of the Ukrainian name, but
-# "Kiev" is more common in English.
+# This represents most of Ukraine.  See above for the spelling of "Kiev".
 Zone Europe/Kiev	2:02:04 -	LMT	1880
 			2:02:04	-	KMT	1924 May  2 # Kiev Mean Time
 			2:00	-	EET	1930 Jun 21
--- contrib/tzdata/factory.orig
+++ contrib/tzdata/factory
@@ -1,8 +1,10 @@
+# tzdb data for noncommittal factory settings
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
-# For distributors who don't want to put time zone specification in
-# their installation procedures.  Users that run 'date' will get the
+# For distributors who don't want to specify a timezone in their
+# installation procedures.  Users who run 'date' will get the
 # time zone abbreviation "-00", indicating that the actual time zone
 # is unknown.
 
--- contrib/tzdata/leap-seconds.list.orig
+++ contrib/tzdata/leap-seconds.list
@@ -204,10 +204,10 @@
 #	current -- the update time stamp, the data and the name of the file
 #	will not change.
 #
-#	Updated through IERS Bulletin C55
-#	File expires on:  28 December 2018
+#	Updated through IERS Bulletin C56
+#	File expires on:  28 June 2019
 #
-#@	3754944000
+#@	3770668800
 #
 2272060800	10	# 1 Jan 1972
 2287785600	11	# 1 Jul 1972
@@ -252,4 +252,4 @@
 #	the hash line is also ignored in the
 #	computation.
 #
-#h	44dcf58c e28d25aa b36612c8 f3d3e8b5 a8fdf478
+#h 	62ca19f6 96a4ae0a 3708451c 9f8693f4 016604eb
--- contrib/tzdata/leapseconds.orig
+++ contrib/tzdata/leapseconds
@@ -3,21 +3,25 @@
 # This file is in the public domain.
 
 # This file is generated automatically from the data in the public-domain
-# leap-seconds.list file, which is copied from:
-# ftp://ftp.nist.gov/pub/time/leap-seconds.list
+# leap-seconds.list file, which can be copied from
+# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>
+# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>
+# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>.
 # For more about leap-seconds.list, please see
 # The NTP Timescale and Leap Seconds
-# https://www.eecis.udel.edu/~mills/leap.html
+# <https://www.eecis.udel.edu/~mills/leap.html>.
 
 # The International Earth Rotation and Reference Systems Service
 # periodically uses leap seconds to keep UTC to within 0.9 s of UT1
-# (which measures the true angular orientation of the earth in space); see
-# Levine J. Coordinated Universal Time and the leap second.
+# (which measures the true angular orientation of the earth in space)
+# and publishes leap second data in a copyrighted file
+# <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>.
+# See: Levine J. Coordinated Universal Time and the leap second.
 # URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
-# http://ieeexplore.ieee.org/document/7909995/
+# <https://ieeexplore.ieee.org/document/7909995>.
 # There were no leap seconds before 1972, because the official mechanism
 # accounting for the discrepancy between atomic time and the earth's rotation
-# did not exist until the early 1970s.
+# did not exist.
 
 # The correction (+ or -) is made at the given time, so lines
 # will typically look like:
@@ -25,10 +29,7 @@
 # or
 #	Leap	YEAR	MON	DAY	23:59:59	-	R/S
 
-# If the leapsecond is Rolling (R) the given time is local time.
-# If the leapsecond is Stationary (S) the given time is UTC.
-
-# Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
+# If the leap second is Rolling (R) the given time is local time (unused here).
 Leap	1972	Jun	30	23:59:60	+	S
 Leap	1972	Dec	31	23:59:60	+	S
 Leap	1973	Dec	31	23:59:60	+	S
@@ -57,5 +58,9 @@
 Leap	2015	Jun	30	23:59:60	+	S
 Leap	2016	Dec	31	23:59:60	+	S
 
-#	Updated through IERS Bulletin C55
-#	File expires on:  28 December 2018
+# POSIX timestamps for the data in this file:
+#updated 1467936000
+#expires 1561680000
+
+#	Updated through IERS Bulletin C56
+#	File expires on:  28 June 2019
--- contrib/tzdata/leapseconds.awk.orig
+++ contrib/tzdata/leapseconds.awk
@@ -8,21 +8,25 @@
   print "# This file is in the public domain."
   print ""
   print "# This file is generated automatically from the data in the public-domain"
-  print "# leap-seconds.list file, which is copied from:"
-  print "# ftp://ftp.nist.gov/pub/time/leap-seconds.list"
+  print "# leap-seconds.list file, which can be copied from"
+  print "# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>"
+  print "# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>"
+  print "# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>."
   print "# For more about leap-seconds.list, please see"
   print "# The NTP Timescale and Leap Seconds"
-  print "# https://www.eecis.udel.edu/~mills/leap.html"
+  print "# <https://www.eecis.udel.edu/~mills/leap.html>."
   print ""
   print "# The International Earth Rotation and Reference Systems Service"
   print "# periodically uses leap seconds to keep UTC to within 0.9 s of UT1"
-  print "# (which measures the true angular orientation of the earth in space); see"
-  print "# Levine J. Coordinated Universal Time and the leap second."
+  print "# (which measures the true angular orientation of the earth in space)"
+  print "# and publishes leap second data in a copyrighted file"
+  print "# <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>."
+  print "# See: Levine J. Coordinated Universal Time and the leap second."
   print "# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995"
-  print "# http://ieeexplore.ieee.org/document/7909995/"
+  print "# <https://ieeexplore.ieee.org/document/7909995>."
   print "# There were no leap seconds before 1972, because the official mechanism"
   print "# accounting for the discrepancy between atomic time and the earth's rotation"
-  print "# did not exist until the early 1970s."
+  print "# did not exist."
   print ""
   print "# The correction (+ or -) is made at the given time, so lines"
   print "# will typically look like:"
@@ -30,18 +34,35 @@
   print "# or"
   print "#	Leap	YEAR	MON	DAY	23:59:59	-	R/S"
   print ""
-  print "# If the leapsecond is Rolling (R) the given time is local time."
-  print "# If the leapsecond is Stationary (S) the given time is UTC."
-  print ""
-  print "# Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S"
+  print "# If the leap second is Rolling (R) the given time is local time (unused here)."
+
+  monthabbr[ 1] = "Jan"
+  monthabbr[ 2] = "Feb"
+  monthabbr[ 3] = "Mar"
+  monthabbr[ 4] = "Apr"
+  monthabbr[ 5] = "May"
+  monthabbr[ 6] = "Jun"
+  monthabbr[ 7] = "Jul"
+  monthabbr[ 8] = "Aug"
+  monthabbr[ 9] = "Sep"
+  monthabbr[10] = "Oct"
+  monthabbr[11] = "Nov"
+  monthabbr[12] = "Dec"
+  for (i in monthabbr) {
+      monthnum[monthabbr[i]] = i
+      monthlen[i] = 31
+  }
+  monthlen[2] = 28
+  monthlen[4] = monthlen[6] = monthlen[9] = monthlen[11] = 30
 }
 
-/^ *$/ { next }
-
 /^#\tUpdated through/ || /^#\tFile expires on:/ {
     last_lines = last_lines $0 "\n"
 }
 
+/^#[$][ \t]/ { updated = $2 }
+/^#[@][ \t]/ { expires = $2 }
+
 /^#/ { next }
 
 {
@@ -57,14 +78,14 @@
 	} else {
 	    sign = "23:59:59\t-"
 	}
-	if (month == "Jan") {
+	m = monthnum[month] - 1
+	if (m == 0) {
 	    year--;
-	    month = "Dec";
-	    day = 31
-	} else if (month == "Jul") {
-	    month = "Jun";
-	    day = 30
+	    m = 12
 	}
+	month = monthabbr[m]
+	day = monthlen[m]
+	day += m == 2 && year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
 	printf "Leap\t%s\t%s\t%s\t%s\tS\n", year, month, day, sign
     }
     old_TAI_minus_UTC = TAI_minus_UTC
@@ -71,5 +92,14 @@
 }
 
 END {
+    # The difference between the NTP and POSIX epochs is 70 years
+    # (including 17 leap days), each 24 hours of 60 minutes of 60
+    # seconds each.
+    epoch_minus_NTP = ((1970 - 1900) * 365 + 17) * 24 * 60 * 60
+
+    print ""
+    print "# POSIX timestamps for the data in this file:"
+    printf "#updated %s\n", updated - epoch_minus_NTP
+    printf "#expires %s\n", expires - epoch_minus_NTP
     printf "\n%s", last_lines
 }
--- contrib/tzdata/northamerica.orig
+++ contrib/tzdata/northamerica
@@ -1,3 +1,5 @@
+# tzdb data for North and Central America and environs
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -48,7 +50,7 @@
 #
 # Most of the US soon followed suit.  See:
 # Bartky IR. The adoption of standard time. Technol Cult 1989 Jan;30(1):25-56.
-# http://dx.doi.org/10.2307/3105430
+# https://dx.doi.org/10.2307/3105430
 
 # From Paul Eggert (2005-04-16):
 # That 1883 transition occurred at 12:00 new time, not at 12:00 old time.
@@ -437,6 +439,19 @@
 # western South Dakota, far western Texas (El Paso County, Hudspeth County,
 # and Pine Springs and Nickel Creek in Culberson County), Utah, Wyoming
 #
+# From Paul Eggert (2018-10-25):
+# On 1921-03-04 federal law placed all of Texas into the central time zone.
+# However, El Paso ignored the law for decades and continued to observe
+# mountain time, on the grounds that that's what they had always done
+# and they weren't about to let the federal government tell them what to do.
+# Eventually the federal government gave in and changed the law on
+# 1970-04-10 to match what El Paso was actually doing.  Although
+# that's slightly after our 1970 cutoff, there is no need to create a
+# separate zone for El Paso since they were ignoring the law anyway.  See:
+# Long T. El Pasoans were time rebels, fought to stay in Mountain zone.
+# El Paso Times. 2018-10-24 06:40 -06.
+# https://www.elpasotimes.com/story/news/local/el-paso/2018/10/24/el-pasoans-were-time-rebels-fought-stay-mountain-zone/1744509002/
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule	Denver	1920	1921	-	Mar	lastSun	2:00	1:00	D
 Rule	Denver	1920	only	-	Oct	lastSun	2:00	0	S
@@ -706,9 +721,7 @@
 Zone Pacific/Honolulu	-10:31:26 -	LMT	1896 Jan 13 12:00
 			-10:30	-	HST	1933 Apr 30  2:00
 			-10:30	1:00	HDT	1933 May 21 12:00
-			-10:30	-	HST	1942 Feb  9  2:00
-			-10:30	1:00	HDT	1945 Sep 30  2:00
-			-10:30	-	HST	1947 Jun  8  2:00
+			-10:30	US	H%sT	1947 Jun  8  2:00
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
--- contrib/tzdata/pacificnew.orig
+++ contrib/tzdata/pacificnew
@@ -1,3 +1,5 @@
+# tzdb data for proposed US election time (this file is obsolete)
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- contrib/tzdata/southamerica.orig
+++ contrib/tzdata/southamerica
@@ -1,3 +1,5 @@
+# tzdb data for South America and environs
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -392,7 +394,7 @@
 # standard time, so let's do that here too.  This does not change UTC
 # offsets, only tm_isdst and the time zone abbreviations.  One minor
 # plus is that this silences a zic complaint that there's no POSIX TZ
-# setting for time stamps past 2038.
+# setting for timestamps past 2038.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
@@ -925,6 +927,14 @@
 # ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html
 # From Steffen Thorsen (2017-12-20):
 # http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm
+#
+# From Fábio Gomes (2018-10-04):
+# The Brazilian president just announced a new change on this year DST.
+# It was scheduled to start on November 4th and it was changed to November 18th.
+# From Rodrigo Brüning Wessler (2018-10-15):
+# The Brazilian government just announced that the change in DST was
+# canceled....  Maybe the president Michel Temer also woke up one hour
+# earlier today. :)
 Rule	Brazil	2018	max	-	Nov	Sun>=1	0:00	1:00	-
 Rule	Brazil	2023	only	-	Feb	Sun>=22	0:00	0	-
 Rule	Brazil	2024	2025	-	Feb	Sun>=15	0:00	0	-
@@ -1231,6 +1241,24 @@
 # they will switch from -03 to -04 one hour after Santiago does that day.
 # For now, assume that they will not revert.
 
+# From Juan Correa (2018-08-13):
+# As of moments ago, the Ministry of Energy in Chile has announced the new
+# schema for DST. ...  Announcement in video (in Spanish):
+# https://twitter.com/MinEnergia/status/1029000399129374720
+# From Yonathan Dossow (2018-08-13):
+# The video says "first Saturday of September", we all know it means Sunday at
+# midnight.
+# From Tim Parenti (2018-08-13):
+# Translating the captions on the video at 0:44-0:55, "We want to announce as
+# Government that from 2019, Winter Time will be increased to 5 months, between
+# the first Saturday of April and the first Saturday of September."
+# At 2:08-2:20, "The Magallanes region will maintain its current time, as
+# decided by the citizens during 2017, but our Government will promote a
+# regional dialogue table to gather their opinion on this matter."
+# https://twitter.com/MinEnergia/status/1029009354001973248
+# "We will keep the new time policy unchanged for at least the next 4 years."
+# So we extend the new rules on Saturdays at 24:00 mainland time indefinitely.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Chile	1927	1931	-	Sep	 1	0:00	1:00	-
 Rule	Chile	1928	1932	-	Apr	 1	0:00	0	-
@@ -1264,8 +1292,10 @@
 Rule	Chile	2011	only	-	Aug	Sun>=16	4:00u	1:00	-
 Rule	Chile	2012	2014	-	Apr	Sun>=23	3:00u	0	-
 Rule	Chile	2012	2014	-	Sep	Sun>=2	4:00u	1:00	-
-Rule	Chile	2016	max	-	May	Sun>=9	3:00u	0	-
-Rule	Chile	2016	max	-	Aug	Sun>=9	4:00u	1:00	-
+Rule	Chile	2016	2018	-	May	Sun>=9	3:00u	0	-
+Rule	Chile	2016	2018	-	Aug	Sun>=9	4:00u	1:00	-
+Rule	Chile	2019	max	-	Apr	Sun>=2	3:00u	0	-
+Rule	Chile	2019	max	-	Sep	Sun>=2	4:00u	1:00	-
 # IATA SSIM anomalies: (1992-02) says 1992-03-14;
 # (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--- contrib/tzdata/systemv.orig
+++ contrib/tzdata/systemv
@@ -1,3 +1,5 @@
+# tzdb data for System V rules (this file is obsolete)
+
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- contrib/tzdata/theory.html.orig
+++ contrib/tzdata/theory.html
@@ -1,7 +1,11 @@
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <title>Theory and pragmatics of the tz code and data</title>
   <meta charset="UTF-8">
+  <style>
+    pre {margin-left: 2em; white-space: pre-wrap;}
+  </style>
 </head>
 
 <body>
@@ -11,7 +15,7 @@
     <ul>
       <li><a href="#scope">Scope of the <code><abbr>tz</abbr></code>
 	  database</a></li>
-      <li><a href="#naming">Names of time zone rulesets</a></li>
+      <li><a href="#naming">Names of timezones</a></li>
       <li><a href="#abbreviations">Time zone abbreviations</a></li>
       <li><a href="#accuracy">Accuracy of the <code><abbr>tz</abbr></code>
 	  database</a></li>
@@ -31,13 +35,13 @@
 all computer-based clocks that track civil time.
 It organizes <a href="tz-link.html">time zone and daylight saving time
 data</a> by partitioning the world into <a
-href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">regions</a>
+href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"><dfn>timezones</dfn></a>
 whose clocks all agree about timestamps that occur after the <a
 href="https://en.wikipedia.org/wiki/Unix_time">POSIX Epoch</a>
 (1970-01-01 00:00:00 <a
 href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time"><abbr
 title="Coordinated Universal Time">UTC</abbr></a>).
-The database labels each such region with a notable location and
+The database labels each timezone with a notable location and
 records all known clock transitions for that location.
 Although 1970 is a somewhat-arbitrary cutoff, there are significant
 challenges to moving the cutoff earlier even by a decade or two, due
@@ -46,7 +50,24 @@
 </p>
 
 <p>
-Clock transitions before 1970 are recorded for each such location,
+Each timezone typically corresponds to a geographical region that is
+smaller than a traditional time zone, because clocks in a timezone
+all agree after 1970 whereas a traditional time zone merely
+specifies current standard time. For example, applications that deal
+with current and future timestamps in the traditional North
+American mountain time zone can choose from the timezones
+<code>America/Denver</code> which observes US-style daylight saving
+time, <code>America/Mazatlan</code> which observes Mexican-style DST,
+and <code>America/Phoenix</code> which does not observe DST.
+Applications that also deal with past timestamps in the mountain time
+zone can choose from over a dozen timezones, such as
+<code>America/Boise</code>, <code>America/Edmonton</code>, and
+<code>America/Hermosillo</code>, each of which currently uses mountain
+time but differs from other timezones for some timestamps after 1970.
+</p>
+
+<p>
+Clock transitions before 1970 are recorded for each timezone,
 because most systems support timestamps before 1970 and could
 misbehave if data entries were omitted for pre-1970 transitions.
 However, the database is not designed for and does not suffice for
@@ -73,30 +94,36 @@
 Because the database's scope encompasses real-world changes to civil
 timekeeping, its model for describing time is more complex than the
 standard and daylight saving times supported by POSIX.
-A <code><abbr>tz</abbr></code> region corresponds to a ruleset that can
+A <code><abbr>tz</abbr></code> timezone corresponds to a ruleset that can
 have more than two changes per year, these changes need not merely
 flip back and forth between two alternatives, and the rules themselves
 can change at times.
-Whether and when a <code><abbr>tz</abbr></code> region changes its
-clock, and even the region's notional base offset from UTC, are variable.
-It does not always make sense to talk about a region's
-"base offset", since it is not necessarily a single number.
+Whether and when a timezone changes its
+clock, and even the timezone's notional base offset from UTC, are variable.
+It does not always make sense to talk about a timezone's
+"base offset", which is not necessarily a single number.
 </p>
 
 </section>
 
 <section>
-  <h2 id="naming">Names of time zone rulesets</h2>
+  <h2 id="naming">Names of timezones</h2>
 <p>
-Each <code><abbr>tz</abbr></code> region has a unique name that
-corresponds to a set of time zone rules.
+Each timezone has a unique name.
 Inexperienced users are not expected to select these names unaided.
 Distributors should provide documentation and/or a simple selection
-interface that explains the names; for one example, see the
+interface that explains each name via a map or via descriptive text like
+"Ruthenia" instead of the timezone name "<code>Europe/Uzhgorod</code>".
+If geolocation information is available, a selection interface can
+locate the user on a timezone map or prioritize names that are
+geographically close. For an example selection interface, see the
 <code>tzselect</code> program in the <code><abbr>tz</abbr></code> code.
 The <a href="http://cldr.unicode.org/">Unicode Common Locale Data
 Repository</a> contains data that may be useful for other selection
-interfaces.
+interfaces; it maps timezone names like <code>Europe/Uzhgorod</code>
+to CLDR names like <code>uauzh</code> which are in turn mapped to
+locale-dependent strings like "Uzhhorod", "Ungvár", "Ужгород", and
+"乌日哥罗德".
 </p>
 
 <p>
@@ -106,12 +133,12 @@
 
 <ul>
   <li>
-    Uniquely identify every region where clocks have agreed since 1970.
+    Uniquely identify every timezone where clocks have agreed since 1970.
     This is essential for the intended use: static clocks keeping local
     civil time.
   </li>
   <li>
-    Indicate to experts where that region is.
+    Indicate to experts where the timezone's clocks typically are.
   </li>
   <li>
     Be robust in the presence of political changes.
@@ -131,9 +158,8 @@
 <p>
 Names normally have the form
 <var>AREA</var><code>/</code><var>LOCATION</var>, where
-<var>AREA</var> is the name of a continent or ocean, and
-<var>LOCATION</var> is the name of a specific location within that
-region.
+<var>AREA</var> is a continent or ocean, and
+<var>LOCATION</var> is a specific location within the area.
 North and South America share the same area, '<code>America</code>'.
 Typical names are '<code>Africa/Cairo</code>',
 '<code>America/New_York</code>', and '<code>Pacific/Honolulu</code>'.
@@ -144,7 +170,7 @@
 
 <p>
 Here are the general guidelines used for
-choosing <code><abbr>tz</abbr></code> region names,
+choosing timezone names,
 in decreasing order of importance:
 </p>
 
@@ -196,9 +222,9 @@
     country or territory.
   </li>
   <li>
-    If all the clocks in a region have agreed since 1970,
-    do not bother to include more than one location
-    even if subregions' clocks disagreed before 1970.
+    If all the clocks in a timezone have agreed since 1970,
+    do not bother to include more than one timezone
+    even if some of the clocks disagreed before 1970.
     Otherwise these tables would become annoyingly large.
   </li>
   <li>
@@ -212,7 +238,7 @@
     Keep locations compact.
     Use cities or small islands, not countries or regions, so that any
     future changes do not split individual locations into different
-    <code><abbr>tz</abbr></code> regions.
+    timezones.
     E.g., prefer <code>Europe/Paris</code> to <code>Europe/France</code>,
     since
     <a href="https://en.wikipedia.org/wiki/Time_in_France#History">France
@@ -220,10 +246,10 @@
   </li>
   <li>
     Use mainstream English spelling, e.g., prefer
-    <code>Europe/Rome</code> to <code>Europe/Roma</code>, and
+    <code>Europe/Rome</code> to <code>Europa/Roma</code>, and
     prefer <code>Europe/Athens</code> to the Greek
-    <code>Europe/Αθήνα</code> or the Romanized
-    <code>Europe/Athína</code>.
+    <code>Ευρώπη/Αθήνα</code> or the Romanized
+    <code>Evrópi/Athína</code>.
     The POSIX file name restrictions encourage this guideline.
   </li>
   <li>
@@ -274,9 +300,9 @@
 
 <p>
 The file '<code>zone1970.tab</code>' lists geographical locations used
-to name <code><abbr>tz</abbr></code> regions.
+to name timezones.
 It is intended to be an exhaustive list of names for geographic
-regions as described above; this is a subset of the names in the data.
+regions as described above; this is a subset of the timezones in the data.
 Although a '<code>zone1970.tab</code>' location's
 <a href="https://en.wikipedia.org/wiki/Longitude">longitude</a>
 corresponds to
@@ -381,7 +407,7 @@
       EST/EDT/EWT/EPT/EDDT Eastern [North America],
       EET/EEST Eastern European,
       GST Guam,
-      HST/HDT Hawaii,
+      HST/HDT/HWT/HPT Hawaii,
       HKT/HKST Hong Kong,
       IST India,
       IST/GMT Irish,
@@ -398,6 +424,7 @@
       NZST/NZDT New Zealand 1946&ndash;present,
       PKT/PKST Pakistan,
       PST/PDT/PWT/PPT/PDDT Pacific,
+      PST/PDT Philippine,
       SAST South Africa,
       SST Samoa,
       WAT/WAST West Africa,
@@ -453,7 +480,7 @@
 
     <p>
     <small>A few abbreviations also follow the pattern that
-    <abbr>GMT<abbr>/<abbr>BST</abbr> established for time in the UK.
+    <abbr>GMT</abbr>/<abbr>BST</abbr> established for time in the UK.
     They are:
       CMT/BST for Calamarca Mean Time and Bolivian Summer Time
 	1890&ndash;1932,
@@ -473,7 +500,7 @@
   </li>
   <li>
     If there is no common English abbreviation, use numeric offsets like
-    <code>-</code>05 and <code>+</code>0830 that are generated
+    <code>-</code>05 and <code>+</code>0530 that are generated
     by <code>zic</code>'s <code>%z</code> notation.
   </li>
   <li>
@@ -488,8 +515,8 @@
     usage.
   </li>
   <li>
-    Use a consistent style in a <code><abbr>tz</abbr></code> region's history.
-    For example, if history tends to use numeric
+    Use a consistent style in a timezone's history.
+    For example, if a history tends to use numeric
     abbreviations and a particular entry could go either way, use a
     numeric abbreviation.
   </li>
@@ -501,7 +528,7 @@
     The leading '<code>-</code>' is a flag that the <abbr>UT</abbr> offset is in
     some sense undefined; this notation is derived
     from <a href="https://tools.ietf.org/html/rfc3339">Internet
-    <abbr title="Request For Comments">RFC 3339</a>.
+    <abbr title="Request For Comments">RFC</abbr> 3339</a>.
   </li>
 </ul>
 
@@ -543,7 +570,7 @@
     The pre-1970 entries in this database cover only a tiny sliver of how
     clocks actually behaved; the vast majority of the necessary
     information was lost or never recorded.
-    Thousands more <code><abbr>tz</abbr></code> regions would be needed if
+    Thousands more timezones would be needed if
     the <code><abbr>tz</abbr></code> database's scope were extended to
     cover even just the known or guessed history of standard time; for
     example, the current single entry for France would need to split
@@ -608,19 +635,19 @@
   </li>
   <li>
     The <code><abbr>tz</abbr></code> database does not record the
-    earliest time for which a <code><abbr>tz</abbr></code> region's
+    earliest time for which a timezone's
     data entries are thereafter valid for every location in the region.
     For example, <code>Europe/London</code> is valid for all locations
     in its region after <abbr>GMT</abbr> was made the standard time,
     but the date of standardization (1880-08-02) is not in the
     <code><abbr>tz</abbr></code> database, other than in commentary.
-    For many <code><abbr>tz</abbr></code> regions the earliest time of
+    For many timezones the earliest time of
     validity is unknown.
   </li>
   <li>
     The <code><abbr>tz</abbr></code> database does not record a
     region's boundaries, and in many cases the boundaries are not known.
-    For example, the <code><abbr>tz</abbr></code> region
+    For example, the timezone
     <code>America/Kentucky/Louisville</code> represents a region
     around the city of Louisville, the boundaries of which are
     unclear.
@@ -664,13 +691,20 @@
     way to specify Easter, these exceptional years are entered as
     separate <code><abbr>tz</abbr> Rule</code> lines, even though the
     legal rules did not change.
+    When transitions are known but the historical rules behind them are not,
+    the database contains <code>Zone</code> and <code>Rule</code>
+    entries that are intended to represent only the generated
+    transitions, not any underlying historical rules; however, this
+    intent is recorded at best only in commentary.
   </li>
   <li>
-    The <code><abbr>tz</abbr></code> database models pre-standard time
+    The <code><abbr>tz</abbr></code> database models time
     using the <a
     href="https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar">proleptic
-    Gregorian calendar</a> and local mean time, but many people used
-    other calendars and other timescales.
+    Gregorian calendar</a> with days containing 24 equal-length hours
+    numbered 00 through 23, except when clock transitions occur.
+    Pre-standard time is modeled as local mean time.
+    However, historically many people used other calendars and other timescales.
     For example, the Roman Empire used
     the <a href="https://en.wikipedia.org/wiki/Julian_calendar">Julian
     calendar</a>,
@@ -677,6 +711,19 @@
     and <a href="https://en.wikipedia.org/wiki/Roman_timekeeping">Roman
     timekeeping</a> had twelve varying-length daytime hours with a
     non-hour-based system at night.
+    And even today, some local practices diverge from the Gregorian
+    calendar with 24-hour days. These divergences range from
+    relatively minor, such as Japanese bars giving times like "24:30" for the
+    wee hours of the morning, to more-significant differences such as <a
+    href="https://www.pri.org/stories/2015-01-30/if-you-have-meeting-ethiopia-you-better-double-check-time">the
+    east African practice of starting the day at dawn</a>, renumbering
+    the Western 06:00 to be 12:00. These practices are largely outside
+    the scope of the <code><abbr>tz</abbr></code> code and data, which
+    provide only limited support for date and time localization
+    such as that required by POSIX. If DST is not used a different time zone
+    can often do the trick; for example, in Kenya a <code>TZ</code> setting
+    like <code>&lt;-03&gt;3</code> or <code>America/Cayenne</code> starts
+    the day six hours later than <code>Africa/Nairobi</code> does.
   </li>
   <li>
     Early clocks were less reliable, and data entries do not represent
@@ -710,7 +757,7 @@
     historical <a href="https://en.wikipedia.org/wiki/Solar_time">solar time</a>
     to more than about one-hour accuracy.
     See: Stephenson FR, Morrison LV, Hohenkerk CY.
-    <a href="http://dx.doi.org/10.1098/rspa.2016.0404">Measurement of
+    <a href="https://dx.doi.org/10.1098/rspa.2016.0404">Measurement of
     the Earth's rotation: 720 BC to AD 2015</a>.
     <cite>Proc Royal Soc A</cite>. 2016 Dec 7;472:20160404.
     Also see: Espenak F. <a
@@ -746,7 +793,7 @@
 should be unacceptable to anybody who cares about the facts.
 In particular, the <code><abbr>tz</abbr></code> database's
 <abbr>LMT</abbr> offsets should not be considered meaningful, and
-should not prompt creation of <code><abbr>tz</abbr></code> regions
+should not prompt creation of timezones
 merely because two locations
 differ in <abbr>LMT</abbr> or transitioned to standard time at
 different dates.
@@ -798,7 +845,7 @@
     <dl>
       <dt><var>std</var> and <var>dst</var></dt><dd>
 	are 3 or more characters specifying the standard
-	and daylight saving time (<abbr>DST</abbr>) zone names.
+	and daylight saving time (<abbr>DST</abbr>) zone abbreviations.
 	Starting with POSIX.1-2001, <var>std</var> and <var>dst</var>
 	may also be in a quoted form like '<code>&lt;+09&gt;</code>';
 	this allows "<code>+</code>" and "<code>-</code>" in the names.
@@ -870,38 +917,38 @@
     <pre><code>TZ='Pacific/Auckland'</code></pre>
   </li>
   <li>
-    POSIX does not define the exact meaning of <code>TZ</code> values like
+    POSIX does not define the <abbr>DST</abbr> transitions
+    for <code>TZ</code> values like
     "<code>EST5EDT</code>".
-    Typically the current <abbr>US</abbr> <abbr>DST</abbr> rules
-    are used to interpret such values, but this means that the
-    <abbr>US</abbr> <abbr>DST</abbr> rules are compiled into each
-    program that does time conversion.
-    This means that when
-    <abbr>US</abbr> time conversion rules change (as in the United
-    States in 1987), all programs that do time conversion must be
+    Traditionally the current <abbr>US</abbr> <abbr>DST</abbr> rules
+    were used to interpret such values, but this meant that the
+    <abbr>US</abbr> <abbr>DST</abbr> rules were compiled into each
+    program that did time conversion. This meant that when
+    <abbr>US</abbr> time conversion rules changed (as in the United
+    States in 1987), all programs that did time conversion had to be
     recompiled to ensure proper results.
   </li>
   <li>
     The <code>TZ</code> environment variable is process-global, which
     makes it hard to write efficient, thread-safe applications that
-    need access to multiple time zone rulesets.
+    need access to multiple timezones.
   </li>
   <li>
     In POSIX, there is no tamper-proof way for a process to learn the
     system's best idea of local wall clock.
-    (This is important for applications that an administrator wants
+    This is important for applications that an administrator wants
     used only at certain times &ndash; without regard to whether the
     user has fiddled the
     <code>TZ</code> environment variable.
     While an administrator can "do everything in <abbr>UT</abbr>" to
     get around the problem, doing so is inconvenient and precludes
-    handling daylight saving time shifts - as might be required to
-    limit phone calls to off-peak hours.)
+    handling daylight saving time shifts &ndash; as might be required to
+    limit phone calls to off-peak hours.
   </li>
   <li>
     POSIX provides no convenient and efficient way to determine
     the <abbr>UT</abbr> offset and time zone abbreviation of arbitrary
-    timestamps, particularly for <code><abbr>tz</abbr></code> regions
+    timestamps, particularly for timezones
     that do not fit into the POSIX model.
   </li>
   <li>
@@ -919,7 +966,7 @@
     Unsigned 32-bit integers are used on one or two platforms, and 36-bit
     and 40-bit integers are also used occasionally.
     Although earlier POSIX versions allowed <code>time_t</code> to be a
-    floating-point type, this was not supported by any practical systems,
+    floating-point type, this was not supported by any practical system,
     and POSIX.1-2013 and the <code><abbr>tz</abbr></code> code both
     require <code>time_t</code> to be an integer type.
   </li>
@@ -931,15 +978,16 @@
   <li>
     <p>
     The <code>TZ</code> environment variable is used in generating
-    the name of a binary file from which time-related information is read
+    the name of a file from which time-related information is read
     (or is interpreted à la POSIX); <code>TZ</code> is no longer
-    constrained to be a three-letter time zone
-    abbreviation followed by a number of hours and an optional three-letter
-    daylight time zone abbreviation.
+    constrained to be a string containing abbreviations
+    and numeric data as described <a href="#POSIX">above</a>.
+    The file's format is <dfn><abbr>TZif</abbr></dfn>,
+    a timezone information format that contains binary data.
     The daylight saving time rules to be used for a
-    particular <code><abbr>tz</abbr></code> region are encoded in the
-    binary file; the format of the file
-    allows U.S., Australian, and other rules to be encoded, and
+    particular timezone are encoded in the
+    <abbr>TZif</abbr> file; the format of the file allows <abbr>US</abbr>,
+    Australian, and other rules to be encoded, and
     allows for situations where more than two time zone
     abbreviations are used.
     </p>
@@ -949,15 +997,15 @@
     might cause "old" programs (that expect <code>TZ</code> to have a
     certain form) to operate incorrectly; consideration was given to using
     some other environment variable (for example, <code>TIMEZONE</code>)
-    to hold the string used to generate the binary file's name.
+    to hold the string used to generate the <abbr>TZif</abbr> file's name.
     In the end, however, it was decided to continue using
     <code>TZ</code>: it is widely used for time zone purposes;
     separately maintaining both <code>TZ</code>
     and <code>TIMEZONE</code> seemed a nuisance; and systems where
     "new" forms of <code>TZ</code> might cause problems can simply
-    use <code>TZ</code> values such as "<code>EST5EDT</code>" which
-    can be used both by "new" programs (à la POSIX) and "old"
-    programs (as zone names and offsets).
+    use legacy <code>TZ</code> values such as "<code>EST5EDT</code>" which
+    can be used by "new" programs as well as by "old" programs that
+    assume pre-POSIX <code>TZ</code> values.
     </p>
   </li>
   <li>
@@ -972,7 +1020,7 @@
     Functions <code>tzalloc</code>, <code>tzfree</code>,
     <code>localtime_rz</code>, and <code>mktime_z</code> for
     more-efficient thread-safe applications that need to use multiple
-    time zone rulesets.
+    timezones.
     The <code>tzalloc</code> and <code>tzfree</code> functions
     allocate and free objects of type <code>timezone_t</code>,
     and <code>localtime_rz</code> and <code>mktime_z</code> are
@@ -1093,8 +1141,9 @@
     standardization proposals.
   </li>
   <li>
-    Other time conversion proposals, in particular the one developed
-    by folks at Hewlett Packard, offer a wider selection of functions
+    Other time conversion proposals, in particular those supported by the
+    <a href="https://howardhinnant.github.io/date/tz.html">Time Zone
+    Database Parser</a>, offer a wider selection of functions
     that provide capabilities beyond those provided here.
     The absence of such functions from this package is not meant to
     discourage the development, standardization, or use of such
@@ -1116,8 +1165,8 @@
 
 <ul>
   <li>
-    A set of <code><abbr>tz</abbr></code> region names as per
-      "<a href="#naming">Names of time zone rulesets</a>" above.
+    A set of timezone names as per
+      "<a href="#naming">Names of timezones</a>" above.
   </li>
   <li>
     Library functions described in "<a href="#functions">Time and date
@@ -1186,7 +1235,7 @@
   <h2 id="planets">Time and time zones on other planets</h2>
 <p>
 Some people's work schedules
-use <a href="https://en.wikipedia.org/wiki/Timekeeping on Mars">Mars time</a>.
+use <a href="https://en.wikipedia.org/wiki/Timekeeping_on_Mars">Mars time</a>.
 Jet Propulsion Laboratory (JPL) coordinators kept Mars time on
 and off during the
 <a href="https://en.wikipedia.org/wiki/Mars_Pathfinder#End_of_mission">Mars
@@ -1218,7 +1267,7 @@
 
 <p>
 Each landed mission on Mars has adopted a different reference for
-solar time keeping, so there is no real standard for Mars time zones.
+solar timekeeping, so there is no real standard for Mars time zones.
 For example, the
 <a href="https://en.wikipedia.org/wiki/Mars_Exploration_Rover">Mars
 Exploration Rover</a> project (2004) defined two time zones "Local
@@ -1290,7 +1339,7 @@
     Matt Williams,
     "<a href="https://www.universetoday.com/37481/days-of-the-planets/">How
     long is a day on the other planets of the solar system?</a>"
-    (2017-04-27).
+    (2016-01-20).
   </li>
 </ul>
 </section>
--- contrib/tzdata/version.orig
+++ contrib/tzdata/version
@@ -1 +1 @@
-2018e
+2018g
--- contrib/tzdata/yearistype.sh.orig
+++ contrib/tzdata/yearistype.sh
@@ -1,4 +1,5 @@
 #! /bin/sh
+: 'Determine whether year is of appropriate type (this file is obsolete).'
 
 : 'This file is in the public domain, so clarified as of'
 : '2006-07-17 by Arthur David Olson.'
--- contrib/tzdata/ziguard.awk.orig
+++ contrib/tzdata/ziguard.awk
@@ -80,6 +80,13 @@
   if (comment_out) {
     sub(/^/, "#")
   }
+
+  # In rearguard format, change the Japan rule line with "Sat>=8 25:00"
+  # to "Sun>=9 1:00", to cater to zic before 2007 and to older Java.
+  if (!vanguard && $1 == "Rule" && $7 == "Sat>=8" && $8 == "25:00") {
+    sub(/Sat>=8/, "Sun>=9")
+    sub(/25:00/, " 1:00")
+  }
 }
 
 # If a Link line is followed by a Zone line for the same data, comment
--- contrib/tzdata/zishrink.awk.orig
+++ contrib/tzdata/zishrink.awk
@@ -6,28 +6,146 @@
 # 'zic' should treat this script's output as if it were identical to
 # this script's input.
 
+# Record a hash N for the new name NAME, checking for collisions.
 
-# Return a new rule name.
-# N_RULE_NAMES keeps track of how many rule names have been generated.
+function record_hash(n, name)
+{
+  if (used_hashes[n]) {
+    printf "# ! collision: %s %s\n", used_hashes[n], name
+    exit 1
+  }
+  used_hashes[n] = name
+}
 
-function gen_rule_name(alphabet, base, rule_name, n, digit)
+# Return a shortened rule name representing NAME,
+# and record this relationship to the hash table.
+
+function gen_rule_name(name, n)
 {
-  alphabet = ""
-  alphabet = alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-  alphabet = alphabet "abcdefghijklmnopqrstuvwxyz"
-  alphabet = alphabet "!$%&'()*+,./:;<=>?@[\\]^_`{|}~"
-  base = length(alphabet)
-  rule_name = ""
-  n = n_rule_names++
+  # Use a simple memonic: the first two letters.
+  n = substr(name, 1, 2)
+  record_hash(n, name)
+  # printf "# %s = %s\n", n, name
+  return n
+}
 
-  do {
-    n -= rule_name && n <= base
-    digit = n % base
-    rule_name = substr(alphabet, digit + 1, 1) rule_name
-    n = (n - digit) / base
-  } while (n);
+function prehash_rule_names(name)
+{
+  # Rule names are not part of the tzdb API, so substitute shorter
+  # ones.  Shortening them consistently from one release to the next
+  # simplifies comparison of the output.  That being said, the
+  # 1-letter names below are not standardized in any way, and can
+  # change arbitrarily from one release to the next, as the main goal
+  # here is compression not comparison.
 
-  return rule_name
+  # Abbreviating these rules names to one letter saved the most space
+  # circa 2018e.
+  rule["Arg"] = "A"
+  rule["Brazil"] = "B"
+  rule["Canada"] = "C"
+  rule["Denmark"] = "D"
+  rule["EU"] = "E"
+  rule["France"] = "F"
+  rule["GB-Eire"] = "G"
+  rule["Halifax"] = "H"
+  rule["Italy"] = "I"
+  rule["Jordan"] = "J"
+  rule["Egypt"] = "K" # "Kemet" in ancient Egyptian
+  rule["Libya"] = "L"
+  rule["Morocco"] = "M"
+  rule["Neth"] = "N"
+  rule["Poland"] = "O" # arbitrary
+  rule["Palestine"] = "P"
+  rule["Cuba"] = "Q" # Its start sounds like "Q".
+  rule["Russia"] = "R"
+  rule["Syria"] = "S"
+  rule["Turkey"] = "T"
+  rule["Uruguay"] = "U"
+  rule["Vincennes"] = "V"
+  rule["Winn"] = "W"
+  rule["Mongol"] = "X" # arbitrary
+  rule["NT_YK"] = "Y"
+  rule["Zion"] = "Z"
+  rule["Austria"] = "a"
+  rule["Belgium"] = "b"
+  rule["C-Eur"] = "c"
+  rule["Algeria"] = "d" # country code DZ
+  rule["E-Eur"] = "e"
+  rule["Taiwan"] = "f" # Formosa
+  rule["Greece"] = "g"
+  rule["Hungary"] = "h"
+  rule["Iran"] = "i"
+  rule["StJohns"] = "j"
+  rule["Chatham"] = "k" # arbitrary
+  rule["Lebanon"] = "l"
+  rule["Mexico"] = "m"
+  rule["Tunisia"] = "n" # country code TN
+  rule["Moncton"] = "o" # arbitrary
+  rule["Port"] = "p"
+  rule["Albania"] = "q" # arbitrary
+  rule["Regina"] = "r"
+  rule["Spain"] = "s"
+  rule["Toronto"] = "t"
+  rule["US"] = "u"
+  rule["Louisville"] = "v" # ville
+  rule["Iceland"] = "w" # arbitrary
+  rule["Chile"] = "x" # arbitrary
+  rule["Para"] = "y" # country code PY
+  rule["Romania"] = "z" # arbitrary
+  rule["Macau"] = "_" # arbitrary
+
+  # Use ISO 3166 alpha-2 country codes for remaining names that are countries.
+  # This is more systematic, and avoids collisions (e.g., Malta and Moldova).
+  rule["Armenia"] = "AM"
+  rule["Aus"] = "AU"
+  rule["Azer"] = "AZ"
+  rule["Barb"] = "BB"
+  rule["Dhaka"] = "BD"
+  rule["Bulg"] = "BG"
+  rule["Bahamas"] = "BS"
+  rule["Belize"] = "BZ"
+  rule["Swiss"] = "CH"
+  rule["Cook"] = "CK"
+  rule["PRC"] = "CN"
+  rule["Cyprus"] = "CY"
+  rule["Czech"] = "CZ"
+  rule["Germany"] = "DE"
+  rule["DR"] = "DO"
+  rule["Ecuador"] = "EC"
+  rule["Finland"] = "FI"
+  rule["Fiji"] = "FJ"
+  rule["Falk"] = "FK"
+  rule["Ghana"] = "GH"
+  rule["Guat"] = "GT"
+  rule["Hond"] = "HN"
+  rule["Haiti"] = "HT"
+  rule["Eire"] = "IE"
+  rule["Iraq"] = "IQ"
+  rule["Japan"] = "JP"
+  rule["Kyrgyz"] = "KG"
+  rule["ROK"] = "KR"
+  rule["Latvia"] = "LV"
+  rule["Lux"] = "LX"
+  rule["Moldova"] = "MD"
+  rule["Malta"] = "MT"
+  rule["Mauritius"] = "MU"
+  rule["Namibia"] = "NA"
+  rule["Nic"] = "NI"
+  rule["Norway"] = "NO"
+  rule["Peru"] = "PE"
+  rule["Phil"] = "PH"
+  rule["Pakistan"] = "PK"
+  rule["Sudan"] = "SD"
+  rule["Salv"] = "SV"
+  rule["Tonga"] = "TO"
+  rule["Vanuatu"] = "VU"
+
+  # Avoid collisions.
+  rule["Detroit"] = "Dt" # De = Denver
+
+  for (name in rule) {
+    record_hash(rule[name], name)
+  }
 }
 
 # Process an input line and save it for later output.
@@ -106,7 +224,7 @@
   i = field[1] == "Z" ? 4 : field[1] == "Li" ? 0 : 2
   if (i && field[i] ~ /^[^-+0-9]/) {
     if (!rule[field[i]])
-      rule[field[i]] = gen_rule_name()
+      rule[field[i]] = gen_rule_name(field[i])
     field[i] = rule[field[i]]
   }
 
@@ -144,8 +262,53 @@
 }
 
 BEGIN {
+  # Files that the output normally depends on.
+  default_dep["africa"] = 1
+  default_dep["antarctica"] = 1
+  default_dep["asia"] = 1
+  default_dep["australasia"] = 1
+  default_dep["backward"] = 1
+  default_dep["etcetera"] = 1
+  default_dep["europe"] = 1
+  default_dep["factory"] = 1
+  default_dep["northamerica"] = 1
+  default_dep["southamerica"] = 1
+  default_dep["systemv"] = 1
+  default_dep["ziguard.awk"] = 1
+  default_dep["zishrink.awk"] = 1
+
+  # Output a version string from 'version' and related configuration variables
+  # supported by tzdb's Makefile.  If you change the makefile or any other files
+  # that affect the output of this script, you should append '-SOMETHING'
+  # to the contents of 'version', where SOMETHING identifies what was changed.
+
+  ndeps = split(deps, dep)
+  ddeps = ""
+  for (i = 1; i <= ndeps; i++) {
+    if (default_dep[dep[i]]) {
+      default_dep[dep[i]]++
+    } else {
+      ddeps = ddeps " " dep[i]
+    }
+  }
+  for (d in default_dep) {
+    if (default_dep[d] == 1) {
+      ddeps = ddeps " !" d
+    }
+  }
   print "# version", version
+  if (dataform != "main") {
+    print "# dataform", dataform
+  }
+  if (redo != "posix_right") {
+    print "# redo " redo
+  }
+  if (ddeps) {
+    print "# ddeps" ddeps
+  }
   print "# This zic input file is in the public domain."
+
+  prehash_rule_names()
 }
 
 /^[\t ]*[^#\t ]/ {
--- contrib/tzdata/zone.tab.orig
+++ contrib/tzdata/zone.tab
@@ -1,9 +1,9 @@
-# tz zone descriptions (deprecated version)
+# tzdb timezone descriptions (deprecated version)
 #
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
-# From Paul Eggert (2014-07-31):
+# From Paul Eggert (2018-06-27):
 # This file is intended as a backward-compatibility aid for older programs.
 # New programs should use zone1970.tab.  This file is like zone1970.tab (see
 # zone1970.tab's comments), but with the following additional restrictions:
@@ -12,13 +12,13 @@
 # 2.  The first data column contains exactly one country code.
 #
 # Because of (2), each row stands for an area that is the intersection
-# of a region identified by a country code and of a zone where civil
+# of a region identified by a country code and of a timezone where civil
 # clocks have agreed since 1970; this is a narrower definition than
 # that of zone1970.tab.
 #
-# This table is intended as an aid for users, to help them select time
-# zone data entries appropriate for their practical needs.  It is not
-# intended to take or endorse any position on legal or territorial claims.
+# This table is intended as an aid for users, to help them select timezones
+# appropriate for their practical needs.  It is not intended to take or
+# endorse any position on legal or territorial claims.
 #
 #country-
 #code	coordinates	TZ			comments
@@ -268,7 +268,7 @@
 MN	+4755+10653	Asia/Ulaanbaatar	Mongolia (most areas)
 MN	+4801+09139	Asia/Hovd	Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
 MN	+4804+11430	Asia/Choibalsan	Dornod, Sukhbaatar
-MO	+2214+11335	Asia/Macau
+MO	+221150+1133230	Asia/Macau
 MP	+1512+14545	Pacific/Saipan
 MQ	+1436-06105	America/Martinique
 MR	+1806-01557	Africa/Nouakchott
--- contrib/tzdata/zone1970.tab.orig
+++ contrib/tzdata/zone1970.tab
@@ -1,36 +1,36 @@
-# tz zone descriptions
+# tzdb timezone descriptions
 #
 # This file is in the public domain.
 #
-# From Paul Eggert (2017-10-01):
-# This file contains a table where each row stands for a zone where
-# civil time stamps have agreed since 1970.  Columns are separated by
+# From Paul Eggert (2018-06-27):
+# This file contains a table where each row stands for a timezone where
+# civil timestamps have agreed since 1970.  Columns are separated by
 # a single tab.  Lines beginning with '#' are comments.  All text uses
 # UTF-8 encoding.  The columns of the table are as follows:
 #
-# 1.  The countries that overlap the zone, as a comma-separated list
+# 1.  The countries that overlap the timezone, as a comma-separated list
 #     of ISO 3166 2-character country codes.
 #     See the file '/usr/share/misc/iso3166'.
-# 2.  Latitude and longitude of the zone's principal location
+# 2.  Latitude and longitude of the timezone's principal location
 #     in ISO 6709 sign-degrees-minutes-seconds format,
 #     either ±DDMM±DDDMM or ±DDMMSS±DDDMMSS,
 #     first latitude (+ is north), then longitude (+ is east).
-# 3.  Zone name used in value of TZ environment variable.
-#     Please see the theory.html file for how zone names are chosen.
-#     If multiple zones overlap a country, each has a row in the
+# 3.  Timezone name used in value of TZ environment variable.
+#     Please see the theory.html file for how these names are chosen.
+#     If multiple timezones overlap a country, each has a row in the
 #     table, with each column 1 containing the country code.
-# 4.  Comments; present if and only if a country has multiple zones.
+# 4.  Comments; present if and only if a country has multiple timezones.
 #
-# If a zone covers multiple countries, the most-populous city is used,
+# If a timezone covers multiple countries, the most-populous city is used,
 # and that country is listed first in column 1; any other countries
 # are listed alphabetically by country code.  The table is sorted
 # first by country code, then (if possible) by an order within the
 # country that (1) makes some geographical sense, and (2) puts the
-# most populous zones first, where that does not contradict (1).
+# most populous timezones first, where that does not contradict (1).
 #
-# This table is intended as an aid for users, to help them select time
-# zone data entries appropriate for their practical needs.  It is not
-# intended to take or endorse any position on legal or territorial claims.
+# This table is intended as an aid for users, to help them select timezones
+# appropriate for their practical needs.  It is not intended to take or
+# endorse any position on legal or territorial claims.
 #
 #country-
 #codes	coordinates	TZ	comments
@@ -232,7 +232,7 @@
 MN	+4755+10653	Asia/Ulaanbaatar	Mongolia (most areas)
 MN	+4801+09139	Asia/Hovd	Bayan-Ölgii, Govi-Altai, Hovd, Uvs, Zavkhan
 MN	+4804+11430	Asia/Choibalsan	Dornod, Sükhbaatar
-MO	+2214+11335	Asia/Macau
+MO	+221150+1133230	Asia/Macau
 MQ	+1436-06105	America/Martinique
 MT	+3554+01431	Europe/Malta
 MU	-2010+05730	Indian/Mauritius
--- contrib/tzdata/zoneinfo2tdf.pl.orig
+++ contrib/tzdata/zoneinfo2tdf.pl
@@ -1,4 +1,5 @@
 #! /usr/bin/perl -w
+# Summarize .zi input in a .zi-like format.
 
 # Courtesy Ken Pizzini.
 
